sorting a dictionary

Mike Meyer mwm at mired.org
Fri Feb 7 02:11:24 CET 2003


Alex Martelli <aleax at aleax.it> writes:

> It's not obvious to me why Python claims that 2j<'1' is defined while 2j<1
> is not.

Of course, you *can* write comparisons that certainly imply that you
can cmopare complex numbers. For instance,

        2j < a < 1

won't raise an exception if a is a non-numeric type. If that makes
sense, then 2j < 1 ought to make sense.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.




More information about the Python-list mailing list