Re: [Tutor] setstate trouble when unpickling

2008-01-27 Thread rspil
I load a cellule with self.cellule=pickle.load(prjfile) Within the class cellule I use this method to add an attribute note ,with success: def __setstate__(self, state): #20080127 ajoute note if 'note' not in state: self.note=*** self.__dict__.update(state)

Re: [Tutor] setstate trouble when unpickling

2008-01-25 Thread Kent Johnson
Jeff Peery wrote: Hello, I've got a fairly simple class instance that I'm pickling. I'm using setstate to update the instance when I unpickle. Although the setstate doesn't seem to be called upon unpickling... here's an example, if anyone see's what I'm doing wrong, please let me know.

[Tutor] setstate trouble when unpickling

2008-01-24 Thread Jeff Peery
Hello, I've got a fairly simple class instance that I'm pickling. I'm using setstate to update the instance when I unpickle. Although the setstate doesn't seem to be called upon unpickling... here's an example, if anyone see's what I'm doing wrong, please let me know. Thanks! so I