MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _setmode

Method _setmode

tools/python-3.11.9-amd64/Lib/turtle.py:1541–1554  ·  view source on GitHub ↗

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

(self, mode=None)

Source from the content-addressed store, hash-verified

1539 self._orient = TNavigator.START_ORIENTATION[self._mode]
1540
1541 def _setmode(self, mode=None):
1542 """Set turtle-mode to 'standard', 'world' or 'logo'.
1543 """
1544 if mode is None:
1545 return self._mode
1546 if mode not in ["standard", "logo", "world"]:
1547 return
1548 self._mode = mode
1549 if mode in ["standard", "world"]:
1550 self._angleOffset = 0
1551 self._angleOrient = 1
1552 else: # mode == "logo":
1553 self._angleOffset = self._fullcircle/4.
1554 self._angleOrient = -1
1555
1556 def _setDegreesPerAU(self, fullcircle):
1557 """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