blob: e6e6e44e86aec058c379c70ee0da721a90efb67f [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{copy_reg} ---
2 Register \module{pickle} support functions.}
Fred Drakeb91e9341998-07-23 17:59:49 +00003\declaremodule[copyreg]{standard}{copy_reg}
Fred Drake1abf0df1998-01-21 04:58:10 +00004
Fred Drakeb91e9341998-07-23 17:59:49 +00005\modulesynopsis{Register \module{pickle} support functions.}
6
7
8The \module{copy_reg} module provides support for the
9\module{pickle}\refstmodindex{pickle} and
10\module{cPickle}\refbimodindex{cPickle} modules. The
11\module{copy}\refstmodindex{copy} module is likely to use this in the
Fred Drake1abf0df1998-01-21 04:58:10 +000012future as well. It provides configuration information about object
13constructors which are not classes. Such constructors may be factory
14functions or class instances.
15
Fred Drake1abf0df1998-01-21 04:58:10 +000016
17\begin{funcdesc}{constructor}{object}
18 Declares \var{object} to be a valid constructor.
19\end{funcdesc}
20
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.
28\end{funcdesc}