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:40:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411828846.19.0.205599343734.issue22505@psf.upfronthosting.co.za>
In-reply-to
Content
I'd like Enum objects to expose their serial numbers. Currently it seems the only way to get this is `MyEnum._member_names_.index(my_enum.name)`, which is not cool because it's cumbersome and involves private variables.

Perhaps we can use `int(my_enum) == 7`? Or `my_enum.number == 7`? I'll be happy to make a patch if there's agreement about this.
History
Date User Action Args
2014-09-27 14:40:46cool-RRsetrecipients: + cool-RR
2014-09-27 14:40:46cool-RRsetmessageid: <1411828846.19.0.205599343734.issue22505@psf.upfronthosting.co.za>
2014-09-27 14:40:46cool-RRlinkissue22505 messages
2014-09-27 14:40:45cool-RRcreate