Incomparable abominations (was: python-dev Summary)

Jeremy Fincher tweedgeezer at
Thu Mar 20 19:41:37 CET 2003

"Greg Ewing (using" <me at> wrote in message news:<b5at5f$21vsdt$1 at>...
> David Mertz, Ph.D. wrote:
> > I want the ability to perform a total ordering on
> > Python objects, at least within a sort.
> In a recent discussion on python-dev, Guido has expressed
> favourable thoughts on introducing a before(x,y) operation
> for arbitrary ordering. So there is hope that we may get
> back the ability to sort arbitrary lists in some future
> version.

If something like this was added, so there was a total ordering on
Python objects during sorts, I'd be completely happy with the
comparison operators </>/<=/>= being changed to only work between
consistent types.  In fact, I'd prefer it that way.

Of course, == and != would still work between inconsistent types.


More information about the Python-list mailing list