Pickle and Instance Methods

Troy Melhase troy.melhase at gmail.com
Sat Mar 17 16:08:04 EDT 2007


> I understand that this cannot be saved by pickle.
> My question is, is there another way of setting a callback that would
> agree with pickle?
> If not is there some way to make pickle ignore the problem attribute?

Try adding a __getstate__ method to your class:

http://docs.python.org/lib/pickle-inst.html



More information about the Python-list mailing list