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

Method _clear

Lib/turtle.py:2700–2711  ·  view source on GitHub ↗

Delete all of pen's drawings

(self)

Source from the content-addressed store, hash-verified

2698 return self.undobuffer.nr_of_items()
2699
2700 def _clear(self):
2701 """Delete all of pen's drawings"""
2702 self._fillitem = self._fillpath = None
2703 for item in self.items:
2704 self.screen._delete(item)
2705 self.currentLineItem = self.screen._createline()
2706 self.currentLine = []
2707 if self._drawing:
2708 self.currentLine.append(self._position)
2709 self.items = [self.currentLineItem]
2710 self.clearstamps()
2711 self.setundobuffer(self._undobuffersize)
2712
2713
2714 def clear(self):

Callers 9

resetMethod · 0.95
clearMethod · 0.95
setUpMethod · 0.45
tearDownMethod · 0.45
test_clearMethod · 0.45
exitFunction · 0.45
_launchMethod · 0.45
mainFunction · 0.45

Calls 5

clearstampsMethod · 0.95
setundobufferMethod · 0.95
_createlineMethod · 0.80
_deleteMethod · 0.45
appendMethod · 0.45

Tested by 4

setUpMethod · 0.36
tearDownMethod · 0.36
test_clearMethod · 0.36