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

Method clear

Lib/collections/__init__.py:164–169  ·  view source on GitHub ↗

od.clear() -> None. Remove all items from od.

(self)

Source from the content-addressed store, hash-verified

162 curr = curr.prev
163
164 def clear(self):
165 'od.clear() -> None. Remove all items from od.'
166 root = self.__root
167 root.prev = root.next = root
168 self.__map.clear()
169 dict.clear(self)
170
171 def popitem(self, last=True):
172 '''Remove and return a (key, value) pair from the dictionary.

Callers 1

test_clearMethod · 0.95

Calls 1

clearMethod · 0.45

Tested by 1

test_clearMethod · 0.76