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

Method clear

Lib/_collections_abc.py:730–736  ·  view source on GitHub ↗

This is slow (creates N new iterators!) but effective.

(self)

Source from the content-addressed store, hash-verified

728 return value
729
730 def clear(self):
731 """This is slow (creates N new iterators!) but effective."""
732 try:
733 while True:
734 self.pop()
735 except KeyError:
736 pass
737
738 def __ior__(self, it):
739 for value in it:

Callers 2

__ixor__Method · 0.95
__isub__Method · 0.95

Calls 1

popMethod · 0.95

Tested by

no test coverage detected