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 barry
Recipients barry, ethan.furman, ncoghlan
Date 2013-05-12.22:00:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20130512180026.60377cd4@limelight.wooz.org>
In-reply-to <1368356222.14.0.0972295622627.issue17961@psf.upfronthosting.co.za>
Content
On May 12, 2013, at 10:57 AM, Nick Coghlan wrote:

>I encountered an interesting suggestion [1] regarding the enum.Enum
>convenience API: use the member names as their values, rather than the
>current integers starting from one.
>
>Since we're now using definition order rather than value order for iteration,
>this suggestion makes a lot of sense to me.

Cute, but I want the functional API to be equivalent to the class syntax.

Besides:

X = Enum('X', ((name, name) for name in 'ant bee cat dog elk'.split()))

is not so much typing.
History
Date User Action Args
2013-05-12 22:00:29barrysetrecipients: + barry, ncoghlan, ethan.furman
2013-05-12 22:00:29barrylinkissue17961 messages
2013-05-12 22:00:29barrycreate