Staging
v0.5.1
https://github.com/python/cpython
Revision 18d81afd2364a4f21ad4d5a63eb7604ff019229f authored by Michael W. Hudson on 16 March 2002, 17:56:51 UTC, committed by Michael W. Hudson on 16 March 2002, 17:56:51 UTC
    revision 2.129 of typeobject.c

"Fix" for SF bug #520644: __slots__ are not pickled.

As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.
1 parent 3df46a8
History
Tip revision: 18d81afd2364a4f21ad4d5a63eb7604ff019229f authored by Michael W. Hudson on 16 March 2002, 17:56:51 UTC
backport gvanrossum's checkin of
Tip revision: 18d81af
File Mode Size
.cvsignore -rw-r--r-- 31 bytes
Grammar -rw-r--r-- 4.5 KB

back to top