pickling problem

Hello, I’ve got a simple wx app and I’m using the pickler to save and load my program data. Since I’m always developing my program I put a setstate() method in the class that I’m pickling. So if I add an attribute to my class I update the instance that will be unpickled by the following:

def setstate(self, d):
if ‘mynewattribute’ not in d:
d[‘mynewattribute’ ] = ‘something goes here’
self.dict.update(d)

My problem is that the setstate method doesn’t seem to be called when I unpickle my file. Is there a reason that this method wouldn’t be called? Thanks.

Jeff

···

Looking for last minute shopping deals?
Find them fast with Yahoo! Search.