pickle question: sequencing of operations
Russell E. Owen
rowen at uw.edu
Fri May 4 15:54:27 EDT 2012
What is the sequence of calls when unpickling a class with __setstate__?
>From experimentation I see that __setstate__ is called and __init__ is
not, but I think I need more info.
I'm trying to pickle an instance of a class that is a subclass of
another class that contains unpickleable objects.
What I'd like to do is basically just pickle the constructor parameters
and then use those to reconstruct the object on unpickle, but I'm not
sure how to go about this. Or an example if anyone has one.
-- Russell
More information about the Python-list
mailing list