diff options
author | Guido van Rossum <guido@python.org> | 1997-12-30 17:44:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-30 17:44:48 (GMT) |
commit | 5793039dcec287e107c79ee2c0627dc08868ee68 (patch) | |
tree | 46f860a29ad895807486987943192277e02ebbcc /Doc | |
parent | 4f80b65aa6ff648036cd8d2b214dd4582ac65c1f (diff) | |
download | cpython-5793039dcec287e107c79ee2c0627dc08868ee68.zip cpython-5793039dcec287e107c79ee2c0627dc08868ee68.tar.gz cpython-5793039dcec287e107c79ee2c0627dc08868ee68.tar.bz2 |
Clarify that __getinitargs__ is called at pickle time!
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libpickle.tex | 4 | ||||
-rw-r--r-- | Doc/libpickle.tex | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex index 508e50d..0d31059 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 508e50d..0d31059 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__} |