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

Method teleport

Lib/turtle.py:1677–1682  ·  view source on GitHub ↗

To be overwritten by child class RawTurtle. Includes no TPen references.

(self, x=None, y=None, *, fill_gap: bool = False)

Source from the content-addressed store, hash-verified

1675 self._position = end
1676
1677 def teleport(self, x=None, y=None, *, fill_gap: bool = False) -> None:
1678 """To be overwritten by child class RawTurtle.
1679 Includes no TPen references."""
1680 new_x = x if x is not None else self._position[0]
1681 new_y = y if y is not None else self._position[1]
1682 self._position = Vec2D(new_x, new_y)
1683
1684 def forward(self, distance):
1685 """Move the turtle forward by the specified distance.

Callers

nothing calls this directly

Calls 1

Vec2DClass · 0.70

Tested by

no test coverage detected