Closed JinpengLI closed 11 years ago
Since VirtualList use member variable to copy a callback function, it cannot be saved by pickle. I have reverted back to old version using parent to find the callback function. Just let you know what I modified, @duchesnay .
Pickle all attributes except one
see : http://stackoverflow.com/questions/6635331/pickle-all-attributes-except-one
class Foo(object): def __init__(self): self.a = 'spam' self.b = 'eggs' self.c = 42 self.fn = self.my_func def my_func(self): print 'My hovercraft is full of eels' import pickle pickle.dumps(Foo()) # throws a "can't pickle instancemethod objects" TypeError
Since VirtualList use member variable to copy a callback function, it cannot be saved by pickle. I have reverted back to old version using parent to find the callback function. Just let you know what I modified, @duchesnay .
Pickle all attributes except one
see : http://stackoverflow.com/questions/6635331/pickle-all-attributes-except-one