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

Class Unpickler

Lib/test/pickletester.py:1367–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1365 def test_custom_find_class(self):
1366 def loads(data):
1367 class Unpickler(self.unpickler):
1368 def find_class(self, module_name, global_name):
1369 return (module_name, global_name)
1370 return Unpickler(io.BytesIO(data)).load()
1371
1372 self.assertEqual(loads(b'cmath\nlog\n.'), ('math', 'log'))

Callers 2

checkMethod · 0.85
loadsMethod · 0.85

Calls

no outgoing calls

Tested by 2

checkMethod · 0.68
loadsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…