[issue22505] Expose an Enum object's serial number
Ethan Furman
report at bugs.python.org
Sat Sep 27 23:55:00 CEST 2014
Ethan Furman added the comment:
Yes, we're sure. ;)
Enums have a definition order to aid in the use-case of auto-numbering, and to make displays consistent. However, the basic Enum type is unordered.
I do not see a serial number as being an intrinsic property of an enum -- outside of auto-numbering (also not available in the stdlib), what difference does it make what order it was defined in? What matters is the name and the value.
If you want your enum to have a serial number you can easily add that functionality in.
----------
assignee: -> ethan.furman
resolution: -> rejected
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22505>
_______________________________________
More information about the Python-bugs-list
mailing list