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, cool-RR, eli.bendersky, ethan.furman
Date 2014-09-27.16:07:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20140927120730.33cf67b8@anarchist.wooz.org>
In-reply-to <1411829981.85.0.261386871342.issue22505@psf.upfronthosting.co.za>
Content
On Sep 27, 2014, at 02:59 PM, Ram Rachum wrote:

>Right now I want it for this: 
>
>http://bugs.python.org/issue22504

https://docs.python.org/3/library/enum.html#orderedenum

>Another use case I can think of is that if you store enum values in a
>database, you're probably using an int field and you'd want to easily convert
>between an enum and it's int value.

Why would you do that for non-int enum values?  There's lots of ways you could
store enum values in a database.   In Mailman, I use "regular" enums (not
IntEnums) but I use int values and store them in the database as INTEGERS.  I
could just as easily have used a string type and stored the enum member name
in the database.  Using subclasses and __members__ I think there's lots of
other viable alternatives that don't require changing the Enum API.
History
Date User Action Args
2014-09-27 16:07:38barrysetrecipients: + barry, eli.bendersky, cool-RR, ethan.furman
2014-09-27 16:07:38barrylinkissue22505 messages
2014-09-27 16:07:37barrycreate