MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/turtle.py:871–882  ·  view source on GitHub ↗
(self, type_, data=None)

Source from the content-addressed store, hash-verified

869 an image or a list constructed using the addcomponent method.
870 """
871 def __init__(self, type_, data=None):
872 self._type = type_
873 if type_ == "polygon":
874 if isinstance(data, list):
875 data = tuple(data)
876 elif type_ == "image":
877 assert(isinstance(data, TK.PhotoImage))
878 elif type_ == "compound":
879 data = []
880 else:
881 raise TurtleGraphicsError("There is no shape type %s" % type_)
882 self._data = data
883
884 def addcomponent(self, poly, fill, outline=None):
885 """Add component to a shape of type compound.

Callers

nothing calls this directly

Calls 1

TurtleGraphicsErrorClass · 0.85

Tested by

no test coverage detected