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(
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 k
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 sa