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
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.1 KB
LICENSE -rw-r--r-- 12.1 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 39.6 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 209.1 KB
configure.in -rw-r--r-- 54.0 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.4 KB

README

back to top