On 28 Feb 2006 09:58:47 -0800
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Add me to the "me, too!" list of people who think
> enumerations would be better off without > or <
> comparison.

+1 on "unordered"

Comparable enums do have use-cases (like the days of the
week), but I can't think of many of them. Also, there is
the point that even the days of the week is not a great
use of the ordering since it varies between locales, as
I think was pointed out in this thread.

The most compelling reason to have some kind of ordering is
just so you can iterate over them -- but dicts are
iterable without being ordered, so I see no reason
why enums couldn't be.

In C, enums are a rather shallow mask pulled over integers,
and as is common practice in C, the mask is routinely
ignored or removed.  I think that enums in Python, if added,
should be "strong enums" without this kind of ambiguous
behavior.

I also think though that the characterization of the
behavior of enumerated value instances is much more
important than the behavior of the enumeration collection
object, which is basically just a set, anyway.

Cheers,
Terry

-- 
Terry Hancock ([EMAIL PROTECTED])
Anansi Spaceworks http://www.AnansiSpaceworks.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to