Re: pickle and __slots__

2007-10-04 Thread JL
I added the following method to the 2 subclasses of asyncore.dispatcher and asynchat.async_chat and now pickle works: def __getstate__(self): return Later I will probably modify this method so it returns something more interesting. Thanks for your help! I was confused because I am not

Re: pickle and __slots__

2007-10-04 Thread JL
> Is this a subclass? Look at the parent classes. Its class is a subclass of a similar class, but it indirectly references instances of subclasses of asyncore.dispatcher or asynchat.async_chat. I don't think there are other particular classes. If I remove the first references, pickle works. A

Re: pickle and __slots__

2007-10-04 Thread John Nagle
JL wrote: > Hello, > > I am trying to pickle an object, and I get: > > TypeError: a class that defines __slots__ without defining > __getstate__ cannot be pickled > > I didn't find __slots__ in the object or the class. Is there a way to > find it, or to to know which object or class causes the p

pickle and __slots__

2007-10-04 Thread JL
Hello, I am trying to pickle an object, and I get: TypeError: a class that defines __slots__ without defining __getstate__ cannot be pickled I didn't find __slots__ in the object or the class. Is there a way to find it, or to to know which object or class causes the problem? Thanks -- http://