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

Method __init__

Lib/turtle.py:3823–3838  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3821 _title = _CFG["title"]
3822
3823 def __init__(self):
3824 if _Screen._root is None:
3825 _Screen._root = self._root = _Root()
3826 self._root.title(_Screen._title)
3827 self._root.ondestroy(self._destroy)
3828 if _Screen._canvas is None:
3829 width = _CFG["width"]
3830 height = _CFG["height"]
3831 canvwidth = _CFG["canvwidth"]
3832 canvheight = _CFG["canvheight"]
3833 leftright = _CFG["leftright"]
3834 topbottom = _CFG["topbottom"]
3835 self._root.setupcanvas(width, height, canvwidth, canvheight)
3836 _Screen._canvas = self._root._getcanvas()
3837 TurtleScreen.__init__(self, _Screen._canvas)
3838 self.setup(width, height, leftright, topbottom)
3839
3840 def setup(self, width=_CFG["width"], height=_CFG["height"],
3841 startx=_CFG["leftright"], starty=_CFG["topbottom"]):

Callers

nothing calls this directly

Calls 7

setupMethod · 0.95
_RootClass · 0.85
ondestroyMethod · 0.80
setupcanvasMethod · 0.80
_getcanvasMethod · 0.80
titleMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected