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

Method reset

tools/python-3.11.9-amd64/Lib/turtle.py:2560–2583  ·  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

2558 self._update()
2559
2560 def reset(self):
2561 """Delete the turtle's drawings and restore its default values.
2562
2563 No argument.
2564
2565 Delete the turtle's drawings from the screen, re-center the turtle
2566 and set variables to the default values.
2567
2568 Example (for a Turtle instance named turtle):
2569 >>> turtle.position()
2570 (0.00,-22.00)
2571 >>> turtle.heading()
2572 100.0
2573 >>> turtle.reset()
2574 >>> turtle.position()
2575 (0.00,0.00)
2576 >>> turtle.heading()
2577 0.0
2578 """
2579 TNavigator.reset(self)
2580 TPen._reset(self)
2581 self._clear()
2582 self._drawturtle()
2583 self._update()
2584
2585 def setundobuffer(self, size):
2586 """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