MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / clear

Method clear

sortedcontainers/sorteddict.py:221–229  ·  view source on GitHub ↗

Remove all items from sorted dict. Runtime complexity: `O(n)`

(self)

Source from the content-addressed store, hash-verified

219
220
221 def clear(self):
222
223 """Remove all items from sorted dict.
224
225 Runtime complexity: `O(n)`
226
227 """
228 dict.clear(self)
229 self._list_clear()
230
231
232 def __delitem__(self, key):

Callers 2

test_initFunction · 0.95
test_clearFunction · 0.95

Calls

no outgoing calls

Tested by 2

test_initFunction · 0.76
test_clearFunction · 0.76