[issue20653] Pickle enums by name

Ethan Furman report at bugs.python.org
Fri Feb 21 05:40:51 CET 2014


Ethan Furman added the comment:

More explanation:

__getnewargs__ is not used by pickle protocol 0 and 1; to support those protocols we need __reduce_ex__.  Since __reduce_ex__ works for 0, 1, 2, 3, 4, ... there's no reason to have both __reduce_ex__ *and* __getnewargs__.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20653>
_______________________________________


More information about the Python-bugs-list mailing list