1 \section{Standard Module
\module{copy_reg
}}
2 % Note that the label is a little off; the underscore causes LaTeX to
7 The
\code{copy_reg
} module provides support for the
8 \code{pickle
}\refstmodindex{pickle
} and
9 \code{cPickle
}\refbimodindex{cPickle
} modules. The
10 \code{copy
}\refstmodindex{copy
} module is likely to use this in the
11 future as well. It provides configuration information about object
12 constructors which are not classes. Such constructors may be factory
13 functions or class instances.
16 \begin{funcdesc
}{constructor
}{object
}
17 Declares
\var{object
} to be a valid constructor.
20 \begin{funcdesc
}{pickle
}{type, function
\optional{, constructor
}}
21 Declares that
\var{function
} should be used as a ``reduction''
22 function for objects of type or class
\var{type
}.
\var{function
}
23 should return either a string or a tuple. The optional
24 \var{constructor
} parameter, if provided, is a callable object which
25 can be used to reconstruct the object when called with the tuple of
26 arguments returned by
\var{function
} at pickling time.