D
Donnal Walter
I have defined a set of new-style classes that override __getstate__()
and __setstate__(). For these classes, copy.deepcopy works fine as long
as __getstate__() returns a value other than None, False, [], {}, '' and
0. The 2.3 documentation says: """For new-style classes, if
__getstate__() returns a false value, the __setstate__() method will not
be called. """ Why is this the case? And is there someway to get around
this, i.e. force __setstate__() to be called anyway?
Donnal Walter
Arkansas Children's Hospital
and __setstate__(). For these classes, copy.deepcopy works fine as long
as __getstate__() returns a value other than None, False, [], {}, '' and
0. The 2.3 documentation says: """For new-style classes, if
__getstate__() returns a false value, the __setstate__() method will not
be called. """ Why is this the case? And is there someway to get around
this, i.e. force __setstate__() to be called anyway?
Donnal Walter
Arkansas Children's Hospital