Staging
v0.5.1
https://github.com/python/cpython
Revision 950dce6f01039bae5efdb8eedbe9ad48d81d0488 authored by Guido van Rossum on 19 December 2001, 16:56:54 UTC, committed by Guido van Rossum on 19 December 2001, 16:56:54 UTC
metaclass, reported by Dan Parisien.

Objects that are instances of custom metaclasses, i.e. whose ob_type
is a subclass of PyType_Type, should be pickled the same as new-style
classes (objects whose ob_type is PyType_Type).  This can't be done
through the existing dispatch switches, and the __reduce__ trick
doesn't work for these, since it finds the unbound __reduce__ for
instances of the class (inherited from PyBaseObject_Type).  So check
explicitly using PyType_IsSubtype().
1 parent f048a8f
History
Tip revision: 950dce6f01039bae5efdb8eedbe9ad48d81d0488 authored by Guido van Rossum on 19 December 2001, 16:56:54 UTC
save(): Fix for SF bug #494904: Cannot pickle a class with a
Tip revision: 950dce6
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.0 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 39.8 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 209.0 KB
configure.in -rw-r--r-- 53.9 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.1 KB

README

back to top