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

noreply@sourceforge.net noreply@sourceforge.net
Wed, 13 Nov 2002 11:30:15 -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: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: __getstate__() documenting 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.


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

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