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

Method copy

Lib/collections/__init__.py:1099–1101  ·  view source on GitHub ↗

New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]

(self)

Source from the content-addressed store, hash-verified

1097 return cls(dict.fromkeys(iterable, value))
1098
1099 def copy(self):
1100 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
1101 return self.__class__(self.maps[0].copy(), *self.maps[1:])
1102
1103 __copy__ = copy
1104

Callers 2

__or__Method · 0.95
test_union_operatorsMethod · 0.95

Calls 2

__class__Method · 0.45
copyMethod · 0.45

Tested by 1

test_union_operatorsMethod · 0.76