Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ copy
Method
copy
Lib/collections/__init__.py:735–737 ·
view source on GitHub ↗
Return a shallow copy.
(self)
Source
from the content-addressed store, hash-verified
733
self.subtract(kwds)
734
735
def
copy(self):
736
'Return a shallow copy.'
737
return
self.__class__(self)
738
739
def
__reduce__(self):
740
return
self.__class__, (dict(self),)
Callers
7
test_copying
Method · 0.95
test_inplace_operations
Method · 0.95
__reduce__
Method · 0.45
copy
Method · 0.45
__copy__
Method · 0.45
copy
Method · 0.45
_force_shutdown
Method · 0.45
Calls
1
__class__
Method · 0.45
Tested by
2
test_copying
Method · 0.76
test_inplace_operations
Method · 0.76