C
Christos TZOTZIOY Georgiou
__getstate__ is easy:
def __getstate__(self):
return tuple(self)
but even
def __getstate__(self):
return self
seems to work, as far as Pickle.dump is concerned. The problem is, how
one writes a __setstate__ for an immutable class?
def __getstate__(self):
return tuple(self)
but even
def __getstate__(self):
return self
seems to work, as far as Pickle.dump is concerned. The problem is, how
one writes a __setstate__ for an immutable class?