[Twisted-Python] One big smile ...
bob at redivi.com
Sat Jul 12 19:47:37 EDT 2003
On Saturday, Jul 12, 2003, at 19:05 America/New_York, Moshe Zadka wrote:
> You also want to avoid persisting nextCall
> def __getstate__(self):
> d = self.__dict__
> if 'nextCall' in d:
> del d['nextCall']
> return d
Note that you shouldn't actually do it like that, you should do it like
d = self.__dict__.copy()
if 'nextCall' in d:
It's never ever a good idea to _break_ your live instances the instant
they get serialized.
More information about the Twisted-Python