Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ __getstate__
Method
__getstate__
Lib/test/test_copy.py:237–238 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
235
def
__init__(self, foo):
236
self.foo = foo
237
def
__getstate__(self):
238
return
{
"foo"
: self.foo}
239
def
__eq__(self, other):
240
return
self.foo == other.foo
241
x = C(42)
Callers
1
test_pickle_issue18997
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected