[issue20653] Pickle enums by name

Serhiy Storchaka report at bugs.python.org
Mon Feb 17 18:19:02 CET 2014


Serhiy Storchaka added the comment:

To pickle by value, the subclass needs only restore current implementation of __reduce_ex__():

    def __reduce_ex__(self, proto):
        return self.__class__, (self.value,)

----------

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


More information about the Python-bugs-list mailing list