MCPcopy Index your code
hub / github.com/grantjenks/python-sortedcontainers / copy

Method copy

sortedcontainers/sortedset.py:374–382  ·  view source on GitHub ↗

Return a shallow copy of the sorted set. Runtime complexity: `O(n)` :return: new sorted set

(self)

Source from the content-addressed store, hash-verified

372
373
374 def copy(self):
375 """Return a shallow copy of the sorted set.
376
377 Runtime complexity: `O(n)`
378
379 :return: new sorted set
380
381 """
382 return self._fromset(set(self._set), key=self._key)
383
384 __copy__ = copy
385

Callers 1

test_copyFunction · 0.95

Calls 1

_fromsetMethod · 0.95

Tested by 1

test_copyFunction · 0.76