Raymond Hettinger wrote:

Conceptually, it's a bug.  The numeric tower treats non-complex
numbers as special cases of complex where the imaginary
component is zero (that's why the non-complex types all support
real/imag), and since complex numbers are not allowed to compare
to themselves, they shouldn't compare to anything else either.

There's a contradiction in there somewhere. If you believe
that a non-complex is equivalent to a complex with zero
imaginary part, then you *should* be able to compare two
complexes provided that their imaginary parts are both
zero.

(I don't think that should be the case, BTW -- complex
numbers live on a two-dimensional plane, and from a
geometrical point of view there's no reason to single
out the x-axis and give it special treatment.)

--
Greg

_______________________________________________
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