Incomparable abominations (was: python-dev Summary)

Jeremy Fincher tweedgeezer at hotmail.com
Thu Mar 20 13:41:37 EST 2003


"Greg Ewing (using news.cis.dfn.de)" <me at privacy.net> wrote in message news:<b5at5f$21vsdt$1 at ID-169208.news.dfncis.de>...
> 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.

Jeremy




More information about the Python-list mailing list