Lines Matching defs:pickle
1 """Helper to provide extensibility for pickle.
3 This is only useful to add pickle support for extension types defined in
7 __all__ = ["pickle", "constructor",
12 def pickle(ob_type, pickle_function, constructor_ob=None):
37 pickle(complex, pickle_complex, complex)
43 pickle(type(int | str), pickle_union)
76 raise TypeError(f"cannot pickle {cls.__name__!r} object")
83 raise TypeError(f"cannot pickle {cls.__name__!r} object: "
108 """Used by pickle protocol 4, instead of __newobj__ to allow classes with
168 # universal, so that the meaning of a pickle does not depend on