From 5793039dcec287e107c79ee2c0627dc08868ee68 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 30 Dec 1997 17:44:48 +0000 Subject: [PATCH] Clarify that __getinitargs__ is called at pickle time! --- Doc/lib/libpickle.tex | 4 +++- Doc/libpickle.tex | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex index 508e50ddcc2..0d310599467 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 508e50ddcc2..0d310599467 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__}