Commit 3ece7132 authored by Fred Drake's avatar Fred Drake

Make it clear that copy_reg.pickle() should not be used for classes, but

only for extension types.

This partially fixes SourceForge bug #116295.
parent f8ca7d88
...@@ -20,9 +20,10 @@ functions or class instances. ...@@ -20,9 +20,10 @@ functions or class instances.
\begin{funcdesc}{pickle}{type, function\optional{, constructor}} \begin{funcdesc}{pickle}{type, function\optional{, constructor}}
Declares that \var{function} should be used as a ``reduction'' Declares that \var{function} should be used as a ``reduction''
function for objects of type or class \var{type}. \var{function} function for objects of type \var{type}; \var{type} should not a
should return either a string or a tuple. The optional class object. \var{function} should return either a string or a
\var{constructor} parameter, if provided, is a callable object which tuple. The optional \var{constructor} parameter, if provided, is a
can be used to reconstruct the object when called with the tuple of callable object which can be used to reconstruct the object when
arguments returned by \var{function} at pickling time. called with the tuple of arguments returned by \var{function} at
pickling time.
\end{funcdesc} \end{funcdesc}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment