4 ms·
> Iterating over the members of an enum does not provide the aliases Anyone know the motivation for this? Seems like a source of frustration to me.
by ajanuary 13y ago
> Iterating over the members of an enum does not provide the aliases
Anyone know the motivation for this? Seems like a source of frustration to me.
- Tobu 13y agoThe aliases aren't part of the enum, if you think of the enum as a set of values. Iterating is done on the values, not the names. (the next paragraph gives you the __members__ ordered dict, if you want to iterate on something else)