From: Guido van Rossum Date: Tue, 30 Dec 1997 17:44:48 +0000 (+0000) Subject: Clarify that __getinitargs__ is called at pickle time! X-Git-Tag: v1.5~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5793039dcec287e107c79ee2c0627dc08868ee68;p=python Clarify that __getinitargs__ is called at pickle time! --- diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex index 508e50ddcc..0d31059946 100644 --- a/Doc/lib/libpickle.tex +++ b/Doc/lib/libpickle.tex @@ -103,7 +103,9 @@ desirable to have a constructor that requires arguments; it is a If it is desirable that the \code{__init__} method be called on unpickling, a class can define a method \code{__getinitargs__()}, which should return a {\em tuple} containing the arguments to be -passed to the class constructor (\code{__init__()}). +passed to the class constructor (\code{__init__()}). This method is +called at pickle time; the tuple it returns is incorporated in the +pickle for the instance. \ttindex{__getinitargs__} \ttindex{__init__} diff --git a/Doc/libpickle.tex b/Doc/libpickle.tex index 508e50ddcc..0d31059946 100644 --- a/Doc/libpickle.tex +++ b/Doc/libpickle.tex @@ -103,7 +103,9 @@ desirable to have a constructor that requires arguments; it is a If it is desirable that the \code{__init__} method be called on unpickling, a class can define a method \code{__getinitargs__()}, which should return a {\em tuple} containing the arguments to be -passed to the class constructor (\code{__init__()}). +passed to the class constructor (\code{__init__()}). This method is +called at pickle time; the tuple it returns is incorporated in the +pickle for the instance. \ttindex{__getinitargs__} \ttindex{__init__}