[issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict)

Pierre Glaser report at bugs.python.org
Fri Feb 8 04:34:32 EST 2019


Pierre Glaser <pierreglaser at msn.com> added the comment:

Thanks Antoine and Raymond for the feedback.

Indeed, a subclass of a slotted class can have a dict: I enriched the script, pickling_depickling instances of such subclasses, with the length-2 tuple __getstate__ method, and made sure their attributes were properly retrieved.

Apart from the different checks on state carried out in the c load_build and the python load_build, AFAICT, it seems like this feature works :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35933>
_______________________________________


More information about the Python-bugs-list mailing list