Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ __copy__
Method
__copy__
Lib/test/test_copy.py:35–36 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
33
def
__init__(self, foo):
34
self.foo = foo
35
def
__copy__(self):
36
return
C(self.foo)
37
x = C(42)
38
y = copy.copy(x)
39
self.assertEqual(y.__class__, x.__class__)
Callers
1
test_copy_pickle
Method · 0.45
Calls
1
C
Class · 0.70
Tested by
no test coverage detected