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

Method setundobuffer

Python/Turtle.py:2483–2500  ·  view source on GitHub ↗

Set or disable undobuffer. Argument: size -- an integer or None If size is an integer an empty undobuffer of given size is installed. Size gives the maximum number of turtle-actions that can be undone by the undo() function. If size is None, no undob

(self, size)

Source from the content-addressed store, hash-verified

2481 self._update()
2482
2483 def setundobuffer(self, size):
2484 """Set or disable undobuffer.
2485
2486 Argument:
2487 size -- an integer or None
2488
2489 If size is an integer an empty undobuffer of given size is installed.
2490 Size gives the maximum number of turtle-actions that can be undone
2491 by the undo() function.
2492 If size is None, no undobuffer is present.
2493
2494 Example (for a Turtle instance named turtle):
2495 >>> turtle.setundobuffer(42)
2496 """
2497 if size is None or size <= 0:
2498 self.undobuffer = None
2499 else:
2500 self.undobuffer = Tbuffer(size)
2501
2502 def undobufferentries(self):
2503 """Return count of entries in the undobuffer.

Callers 1

_clearMethod · 0.95

Calls 1

TbufferClass · 0.85

Tested by

no test coverage detected