[Python-bugs-list] [ python-Bugs-637941 ] __getstate__() documentation is vague

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Nov 2002 21:26:56 -0800


Bugs item #637941, was opened at 2002-11-13 14:26
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=637941&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: __getstate__() documentation is vague

Initial Comment:
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.


----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-11-27 00:26

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libpickle.tex revisions 1.38 and 1.33.6.2.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=637941&group_id=5470