1 \section{\module{copy_reg
} ---
2 Register
\module{pickle
} support functions
}
4 \declaremodule[copyreg
]{standard
}{copy_reg
}
5 \modulesynopsis{Register
\module{pickle
} support functions.
}
8 The
\module{copy_reg
} module provides support for the
9 \refmodule{pickle
}\refstmodindex{pickle
} and
10 \refmodule{cPickle
}\refbimodindex{cPickle
} modules. The
11 \refmodule{copy
}\refstmodindex{copy
} module is likely to use this in the
12 future as well. It provides configuration information about object
13 constructors which are not classes. Such constructors may be factory
14 functions or class instances.
17 \begin{funcdesc
}{constructor
}{object
}
18 Declares
\var{object
} to be a valid constructor.
21 \begin{funcdesc
}{pickle
}{type, function
\optional{, constructor
}}
22 Declares that
\var{function
} should be used as a ``reduction''
23 function for objects of type or class
\var{type
}.
\var{function
}
24 should return either a string or a tuple. The optional
25 \var{constructor
} parameter, if provided, is a callable object which
26 can be used to reconstruct the object when called with the tuple of
27 arguments returned by
\var{function
} at pickling time.