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

Method reset

Python/Turtle.py:2458–2481  ·  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

2456 self._update()
2457
2458 def reset(self):
2459 """Delete the turtle's drawings and restore its default values.
2460
2461 No argument.
2462
2463 Delete the turtle's drawings from the screen, re-center the turtle
2464 and set variables to the default values.
2465
2466 Example (for a Turtle instance named turtle):
2467 >>> turtle.position()
2468 (0.00,-22.00)
2469 >>> turtle.heading()
2470 100.0
2471 >>> turtle.reset()
2472 >>> turtle.position()
2473 (0.00,0.00)
2474 >>> turtle.heading()
2475 0.0
2476 """
2477 TNavigator.reset(self)
2478 TPen._reset(self)
2479 self._clear()
2480 self._drawturtle()
2481 self._update()
2482
2483 def setundobuffer(self, size):
2484 """Set or disable undobuffer.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected