sorting a dictionary

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

Alex Martelli <aleax at> 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 Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list