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

Method copy

sortedcontainers/sorteddict.py:324–332  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

322
323
324 def copy(self):
325 """Return a shallow copy of the sorted dict.
326
327 Runtime complexity: `O(n)`
328
329 :return: new sorted dict
330
331 """
332 return self.__class__(self._key, self.items())
333
334 __copy__ = copy
335

Callers 2

test_copyFunction · 0.95
__reduce__Method · 0.45

Calls 1

itemsMethod · 0.95

Tested by 1

test_copyFunction · 0.76