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

Method clear

sortedcontainers/sortedset.py:364–371  ·  view source on GitHub ↗

Remove all values from sorted set. Runtime complexity: `O(n)`

(self)

Source from the content-addressed store, hash-verified

362
363
364 def clear(self):
365 """Remove all values from sorted set.
366
367 Runtime complexity: `O(n)`
368
369 """
370 self._set.clear()
371 self._list.clear()
372
373
374 def copy(self):

Callers 6

test_initFunction · 0.95
test_clearFunction · 0.95
difference_updateMethod · 0.45
intersection_updateMethod · 0.45
updateMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_initFunction · 0.76
test_clearFunction · 0.76