Pickling gotcha

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Sakkis

    #1

    Pickling gotcha

    I stumbled on some weird pickling behavior that after some non-trivial
    debugging time turned out to be caused by __getstate__ returning an
    empty dict for some instances. As I found digging through the docs
    (http://pythondoc.kldp.net/lib/pickle-inst.html), surprisingly
    __setstate__ is not called nor new style instances if __getstate__
    returns a false valse, without any further justification. Any pointers
    on the rationale for making a special case just out of the blue ?

    George

Working...