Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9361565

Browse files
committed
Document the exceptions that now get raised on invalid parameters.
1 parent cb953d7 commit 9361565

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Doc/lib/libcopyreg.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ \section{\module{copy_reg} ---
1515

1616

1717
\begin{funcdesc}{constructor}{object}
18-
Declares \var{object} to be a valid constructor.
18+
Declares \var{object} to be a valid constructor. If \var{object} is
19+
not callable (and hence not valid as a constructor), raises
20+
\exception{TypeError}.
1921
\end{funcdesc}
2022

2123
\begin{funcdesc}{pickle}{type, function\optional{, constructor}}
@@ -25,5 +27,6 @@ \section{\module{copy_reg} ---
2527
tuple. The optional \var{constructor} parameter, if provided, is a
2628
callable object which can be used to reconstruct the object when
2729
called with the tuple of arguments returned by \var{function} at
28-
pickling time.
30+
pickling time. \exception{TypeError} will be raised if
31+
\var{object} is a class or \var{constructor} is not callable.
2932
\end{funcdesc}

0 commit comments

Comments
 (0)