Any list larger than any number by way of dimensions?

Paul Miller pwmiller1 at
Thu Jul 1 05:21:52 CEST 2004

David Fraser <davidf at> wrote in message news:<cbu24m$pv2$1 at>...

[re: None < number < list < string < tuple ]
> > 
> > Which is consistent but wrong.
> It's consistent but arbitrary. How can you say its wrong? It does what 
> its defined to do.

It may be right, but it's probably not The Right Thing To Do(tm).  The
main problem /I/ have with it is that complex numbers represent an
exception (no pun intended) to this rule among all the built-in types
in that they don't compare to anything.

I wonder if the Right Thing (tm) would be to have comparisons between
types raise an exception unless the interpreter is instructed
otherwise by a __cmp__ method.  This neatly takes care of subclasses
of builtin types, so you could still use a subclass of int, for
example, anywhere you could use an int (unless you specifically
override __cmp__).

from __future__ import comparisons, anyone? :)

More information about the Python-list mailing list