[Python-Dev] Rich comparison confusion

Paul Barrett Barrett@stsci.edu
Fri, 19 Jan 2001 12:32:26 -0500 (EST)

Guido van Rossum writes:
 > ... I can see no valid reason why someone would want to overload
 > a>b different than b<a, ... 

I agree.  But this assumes that the result of A<B and B>A is a
collection of Booleans.  In the Interactive Data Language (IDL) these
operators are essentially mapped to ceiling and floor functions which
are not commutative.  I personally find this silly, but IDL users
coming to Python may be surprised when the comparison of two Numeric
arrays returns a Boolean-like result.

Dr. Paul Barrett       Space Telescope Science Institute
Phone: 410-338-4475    ESS/Science Software Group
FAX:   410-338-4767    Baltimore, MD 21218