[Python-checkins] python/nondist/peps pep-0307.txt,1.23,1.24
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Mon, 10 Feb 2003 13:44:30 -0800
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1:/tmp/cvs-serv2256
Modified Files:
pep-0307.txt
Log Message:
Bozo __getstate__ is gone.
Index: pep-0307.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0307.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pep-0307.txt 10 Feb 2003 21:39:25 -0000 1.23
--- pep-0307.txt 10 Feb 2003 21:44:25 -0000 1.24
***************
*** 390,397 ****
pickled and __setstate__ will not be called at all.
! Note that this strategy ignores slots. New-style classes that
! define slots and don't define __getstate__ in the same class that
! defines the slots automatically have a __getstate__ method added
! that raises TypeError.
--- 390,397 ----
pickled and __setstate__ will not be called at all.
! Note that this strategy ignores slots. Instances of new-style
! classes that have slots but no __getstate__ method cannot be
! pickled by protocols 0 and 1; the code explicitly checks for
! this condition.
***************
*** 441,450 ****
None and whose second item is a dictionary mapping slot names
to slot values described in the previous bullet.
-
- Note that new-style classes that define slots and don't define
- __getstate__ in the same class that defines the slots
- automatically have a __getstate__ method added that raises
- TypeError. Protocol 2 ignores this __getstate__ method
- (recognized by the specific text of the error message).
The __setstate__ method
--- 441,444 ----