On Wed, 07 Aug 2013 00:46:39 +0100, Ian Kelly <ian.g.ke...@gmail.com> wrote:

On Aug 6, 2013 5:15 PM, "Ethan Furman" <et...@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?

You could create sets (frozensets?) of standard and hostile environments as class variables.

--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to