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

Method reset

Lib/turtle.py:2643–2666  ·  view source on GitHub ↗

Delete the turtle's drawings and restore its default values. No argument. Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. Example (for a Turtle instance named turtle): >>> turtle.position()

(self)

Source from the content-addressed store, hash-verified

2641 self._update()
2642
2643 def reset(self):
2644 """Delete the turtle's drawings and restore its default values.
2645
2646 No argument.
2647
2648 Delete the turtle's drawings from the screen, re-center the turtle
2649 and set variables to the default values.
2650
2651 Example (for a Turtle instance named turtle):
2652 >>> turtle.position()
2653 (0.00,-22.00)
2654 >>> turtle.heading()
2655 100.0
2656 >>> turtle.reset()
2657 >>> turtle.position()
2658 (0.00,0.00)
2659 >>> turtle.heading()
2660 0.0
2661 """
2662 TNavigator.reset(self)
2663 TPen._reset(self)
2664 self._clear()
2665 self._drawturtle()
2666 self._update()
2667
2668 def setundobuffer(self, size):
2669 """Set or disable undobuffer.

Callers

nothing calls this directly

Calls 5

_clearMethod · 0.95
_drawturtleMethod · 0.95
_updateMethod · 0.95
resetMethod · 0.45
_resetMethod · 0.45

Tested by

no test coverage detected