Incomparable abominations (was: python-dev Summary)

John Roth johnroth at
Fri Mar 21 02:49:55 CET 2003

"Jeremy Fincher" <tweedgeezer at> wrote in message
news:698f09f8.0303201041.6b69619d at
> "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.

I think that's probably the way is *should* have been from the
beginning. However, I'd be against changing it at this point; it would
break programs. Save the change for Python 3000.

John Roth

> Jeremy

More information about the Python-list mailing list