On Sat, Feb 23, 2013 at 7:02 AM, Stefan Krah <ste...@bytereef.org> wrote:
> eli.bendersky <python-check...@python.org> wrote:
>> +Ordered comparisons between enumeration values are *not* supported.  Enums 
>> are
>> +not integers!

I agree with your idea, but note you probably shouldn't call them
e-num-erations, then.

> Hmm. I think this limits interoperation with C libraries and prototyping
> C code.

Like I say, despite the lack of alignment with C, that this is the
right way to go for a high-level language like Python.  But I don't
think it should be built-into the language.

The bigger question is: what things should be comparable?  and this is
something that has not been settled.  Nor do I believe it can be by
the language.

This is where I rather liked the old __cmp__ function, not only was it
easier to implement, but I could define a comparison and it was
clearer that I was doing so (within the class at least).

Mark
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to