Barry A. Warsaw added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22505> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com