Enum vs OrderedEnum

Ian Kelly ian.g.kelly at gmail.com
Tue Aug 6 19:46:39 EDT 2013


On Aug 6, 2013 5:15 PM, "Ethan Furman" <ethan at stoneleaf.us> wrote:
>
> Use the .value attribute instead.  You could also substitute self for
Environment.

It feels more natural and readable to compare the enum instances rather
than their value attributes. If I am ordering the values then that seems to
imply that the enumeration itself is ordered. So I guess my question is
better stated: is there a better way to do this that doesn't involve
ordered comparisons at all?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130806/758ef73e/attachment.html>


More information about the Python-list mailing list