diff options
author | Guido van Rossum <guido@python.org> | 2001-12-19 16:55:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-19 16:55:02 (GMT) |
commit | f048a8f6d79173cc1da1bf12c60ae06fea36762c (patch) | |
tree | 8010b1cdebbe8d725d689509be7a3082285c0dd9 /Modules/cPickle.c | |
parent | 5935ff07beb0ed2b37dc7a85f04861122eaa5a9a (diff) | |
download | cpython-f048a8f6d79173cc1da1bf12c60ae06fea36762c.zip cpython-f048a8f6d79173cc1da1bf12c60ae06fea36762c.tar.gz cpython-f048a8f6d79173cc1da1bf12c60ae06fea36762c.tar.bz2 |
Pickler.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 class is
a subclass of 'type', should be pickled the same as new-style classes
(objects whose class is 'type'). This can't be done through a
dispatch table entry, and the __reduce__ trick doesn't work for these,
since it finds the unbound __reduce__ for instances of the class
(inherited from 'object'). So check explicitly using issubclass().
Diffstat (limited to 'Modules/cPickle.c')
0 files changed, 0 insertions, 0 deletions