This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alexandre.vassalotti, barry, eli.bendersky, ethan.furman, pitrou, python-dev, serhiy.storchaka
Date 2014-02-08.13:31:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't know if this was discussed, but as far as enums will be used for platform depending constants (as ENOENT or AF_UNIX), I think that enums should be pickled by name, not by value. Here is the __reduce_ex__ implementation:

    def __reduce_ex__(self, proto):
        if proto < 4:
            return getattr, (self.__class__, self._name_)
        return self.__class__.__qualname__ + '.' + self._name_
Date User Action Args
2014-02-08 13:31:20serhiy.storchakasetrecipients: + serhiy.storchaka, barry, pitrou, alexandre.vassalotti, eli.bendersky, ethan.furman, python-dev
2014-02-08 13:31:20serhiy.storchakasetmessageid: <>
2014-02-08 13:31:20serhiy.storchakalinkissue20534 messages
2014-02-08 13:31:20serhiy.storchakacreate