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

Function pickle

Lib/copyreg.py:12–20  ·  view source on GitHub ↗
(ob_type, pickle_function, constructor_ob=None)

Source from the content-addressed store, hash-verified

10dispatch_table = {}
11
12def pickle(ob_type, pickle_function, constructor_ob=None):
13 if not callable(pickle_function):
14 raise TypeError("reduction functions must be callable")
15 dispatch_table[ob_type] = pickle_function
16
17 # The constructor_ob function is a vestige of safe for unpickling.
18 # There is no reason for the caller to pass it anymore.
19 if constructor_ob is not None:
20 constructor(constructor_ob)
21
22def constructor(object):
23 if not callable(object):

Callers 1

copyreg.pyFile · 0.85

Calls 1

constructorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…