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

Class K

Lib/test/picklecommon.py:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32# Hashable immutable key object containing unheshable mutable data.
33class K:
34 def __init__(self, value):
35 self.value = value
36
37 def __reduce__(self):
38 # Shouldn't support the recursion itself
39 return K, (self.value,)
40
41class WithSlots(object):
42 __slots__ = ('a', 'b')

Calls

no outgoing calls

Tested by 5

test_recursive_setMethod · 0.56
test_mock_add_specMethod · 0.40