]> granicus.if.org Git - python/commitdiff
Clarify that __getinitargs__ is called at pickle time!
authorGuido van Rossum <guido@python.org>
Tue, 30 Dec 1997 17:44:48 +0000 (17:44 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 30 Dec 1997 17:44:48 +0000 (17:44 +0000)
Doc/lib/libpickle.tex
Doc/libpickle.tex

index 508e50ddcc2c95e4377260b704da63504d5d7019..0d31059946705798289f94661c6b97362e9a1511 100644 (file)
@@ -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__}
 
index 508e50ddcc2c95e4377260b704da63504d5d7019..0d31059946705798289f94661c6b97362e9a1511 100644 (file)
@@ -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__}