[issue22505] Expose an Enum object's serial number

Ram Rachum report at bugs.python.org
Sat Sep 27 18:15:44 CEST 2014


Ram Rachum added the comment:

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

As I said in the other ticket: I can easily use a subclass, but I think it's general enough functionality for it to be included in the standard library.

I could continue the discussion about databases, but it feels like a waste of time to me. The main principle is: If something has an important property (in this case an enum object's numerical value), it should be publicly exposed. Period. No need to spend hours discussing if and how that property will be used. They always end up getting used somehow-- The only question is whether the people using them need to obtain them through private variables for years until the developers finally understand that the property needs to be exposed publicly. If you want to go through that, be my guest.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22505>
_______________________________________


More information about the Python-bugs-list mailing list