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

Method _setmode

Lib/turtle.py:1601–1614  ·  view source on GitHub ↗

Set turtle-mode to 'standard', 'world' or 'logo'.

(self, mode=None)

Source from the content-addressed store, hash-verified

1599 self._orient = TNavigator.START_ORIENTATION[self._mode]
1600
1601 def _setmode(self, mode=None):
1602 """Set turtle-mode to 'standard', 'world' or 'logo'.
1603 """
1604 if mode is None:
1605 return self._mode
1606 if mode not in ["standard", "logo", "world"]:
1607 return
1608 self._mode = mode
1609 if mode in ["standard", "world"]:
1610 self._angleOffset = 0
1611 self._angleOrient = 1
1612 else: # mode == "logo":
1613 self._angleOffset = self._fullcircle/4.
1614 self._angleOrient = -1
1615
1616 def _setDegreesPerAU(self, fullcircle):
1617 """Helper function for degrees() and radians()"""

Callers 2

__init__Method · 0.95
resetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected