Re: Trying to understand pickle.loads withou class declaration

2005-05-29 Thread Philippe C. Martin
Thanks, Philippe Sébastien Boisgérault wrote: > Even > > class A: > pass > > should do the trick. Only the instance attributes are saved by a > pickle, > not the methods or the class itself. The unpickler tries to merge the > saved data and the class/method info that is not saved

Re: Trying to understand pickle.loads withou class declaration

2005-05-29 Thread Sébastien Boisgérault
Even class A: pass should do the trick. Only the instance attributes are saved by a pickle, not the methods or the class itself. The unpickler tries to merge the saved data and the class/method info that is not saved to recreate the fully functional instance... but of course this info

Re: Trying to understand pickle.loads withou class declaration

2005-05-28 Thread Philippe C. Martin
I confirm that all I have to do in order to successfully load a pickled object of class A is to declare class A: def __init__(self): pass Although the object has tons of fields Quid ? Regards, Philippe Philippe C. Martin wrote: > Hi, > > Shuffling files around in my project,

Trying to understand pickle.loads withou class declaration

2005-05-28 Thread Philippe C. Martin
Hi, Shuffling files around in my project, I notice I broke everything when I stopped declaring classes in a program that "pickled.loaded" existing pickled object of type "classes". The error message being that the class(es) was unknown. However, I _think_, I did manage to do the following in the