Pickling new-style classes w/ getinitargs
Dave Brueck
dave at pythonapocrypha.com
Tue Feb 10 17:05:40 EST 2004
I wrote:
> What is the correct way to pickle a new-style class that makes use of
> __getinitargs__? In the test below, __getinitargs__ gets called only on
> old-style classes (pickle appears to call __getinitargs__ only if the object
> type is InstanceType, but new-style class instances have a type of the the
> class). Google didn't turn up anything obvious; I'm starting my search on
> SourceForge but it's extremely slow at the moment.
Well, SourceForge woke up and told me this:
[ 873246 ] pickle: __getinitargs__ not used for new-style objects
Thanks anyway,
Dave
More information about the Python-list
mailing list