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 cool-RR
Recipients cool-RR
Date 2014-09-27.14:28:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I suggest making Enum members orderable, according to their order in the enum type. Currently trying to order them raises an exception:

    >>> import enum
    >>> class Number(enum.Enum):
    ...     one = 1
    ...     two = 2
    ...     three = 3
    >>> sorted((, Number.two))
    Traceback (most recent call last):
      File "<pyshell#2>", line 1, in <module>
        sorted((, Number.two))
    TypeError: unorderable types: Number() < Number()

If there's agreement from core developers that this is a good feature to add, I'll write a patch.
Date User Action Args
2014-09-27 14:28:23cool-RRsetrecipients: + cool-RR
2014-09-27 14:28:23cool-RRsetmessageid: <>
2014-09-27 14:28:23cool-RRlinkissue22504 messages
2014-09-27 14:28:23cool-RRcreate