MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / _setmode

Method _setmode

Python/Turtle.py:1439–1452  ·  view source on GitHub ↗

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

(self, mode=None)

Source from the content-addressed store, hash-verified

1437 self._orient = TNavigator.START_ORIENTATION[self._mode]
1438
1439 def _setmode(self, mode=None):
1440 """Set turtle-mode to 'standard', 'world' or 'logo'.
1441 """
1442 if mode is None:
1443 return self._mode
1444 if mode not in ["standard", "logo", "world"]:
1445 return
1446 self._mode = mode
1447 if mode in ["standard", "world"]:
1448 self._angleOffset = 0
1449 self._angleOrient = 1
1450 else: # mode == "logo":
1451 self._angleOffset = self._fullcircle/4.
1452 self._angleOrient = -1
1453
1454 def _setDegreesPerAU(self, fullcircle):
1455 """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