This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: __getstate__() documentation is vague
Type: Stage:
Components: Documentation Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, jhylton
Priority: normal Keywords:

Created on 2002-11-13 19:26 by jhylton, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg13215 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-11-13 19:26
If you write a getstate / setstate pair for a new-style
type so that it can be pickled, the reduce code for
new-style types imposes extra restrictions on the
getstate / setstate pair.  Specifically, the setstate
method will be called only if the object returned by
getstate is not false.
The reconstructor code uses the variable "dict" for the
getstate result.  This suggests that it must be a dict,
although I can't tell if that is actually true.  If it
is an empty dict, setstate won't be called.
msg13216 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2002-11-27 05:26
Logged In: YES 

Fixed in Doc/lib/libpickle.tex revisions 1.38 and
Date User Action Args
2022-04-10 16:05:53adminsetgithub: 37469
2002-11-13 19:26:53jhyltoncreate