Python 3.0, rich comparisons and sorting order

Cameron Laird claird at lairds.us
Tue Sep 21 21:08:05 EDT 2004


In article <mailman.3672.1095792078.5135.python-list at python.org>,
Carlos Ribeiro  <carribeiro at gmail.com> wrote:
>On Tue, 21 Sep 2004 14:26:54 -0400, Istvan Albert
><ialbert at mailblocks.com> wrote:
>> If the objects cannot be compared then there is no
>> reasonable result. Getting them back in whatever order is not one.
>> You're better off not sorting then. If half of your objects are
>> sortable and the rest are not what should the result be?
>
>Well, there is a sizeable chunk of mathemathical theory dealing with
>sorting things that can't be directly compared -- google for
>topological sorting. It's used, for example, in graph theory. But
>that's off topic, I've mentioned it just to point to you that it's
>really dangerous to make assertions regarding what's reasonable or not
>with regards to sorting...
			.
			.
			.
I thought I understood this thread, but now I'm *really* confused.
Yes, mathematicians talk about partial orders.  Mr. Ribeiro, I know
you have good ideas.  Are you saying that you do want Python to 
implement topological orders over all input sequences?  In principle,
I guess that's feasible.  It strikes me as a specialty item; we're
all probably best off to build in sorting as it is now, and leave
toposorts to those who need them.  I don't particularly think they'd
confuse the masses.  I just figure Pythonia's energy is better ap-
plied elsewhere.



More information about the Python-list mailing list