diff options
author | Guido van Rossum <guido@python.org> | 2001-12-19 16:56:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-19 16:56:54 (GMT) |
commit | 950dce6f01039bae5efdb8eedbe9ad48d81d0488 (patch) | |
tree | 9959ef9c146a074636478cd85553e20a44f2dd9f /PC/readme.txt | |
parent | f048a8f6d79173cc1da1bf12c60ae06fea36762c (diff) | |
download | cpython-950dce6f01039bae5efdb8eedbe9ad48d81d0488.zip cpython-950dce6f01039bae5efdb8eedbe9ad48d81d0488.tar.gz cpython-950dce6f01039bae5efdb8eedbe9ad48d81d0488.tar.bz2 |
save(): Fix for SF bug #494904: Cannot pickle a class with a
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().
Diffstat (limited to 'PC/readme.txt')
0 files changed, 0 insertions, 0 deletions