Python 3.0, rich comparisons and sorting order

Robert Brewer fumanchu at amor.org
Tue Sep 21 14:25:49 EDT 2004


Carlos Ribeiro wrote:
> On Tue, 21 Sep 2004 17:24:48 +0000 (UTC), Steven Bethard
> <steven.bethard at gmail.com> wrote:
> > Could you give an example of a list that you'd like to do 
> this to?  I'm still
> > having trouble imagining a list of disparate types that I 
> call sort on...
> 
> Assume that you're implementing a spreadsheet like application in
> Python. The user fills a column with arbitrary data, and asks for it
> to be sorted. What is the sorting order? Excel, for instance, defines
> an ordering (it's arbitrary, but it's deterministic).

...which should tell you it's application-specific, and shouldn't be in
the core. "In the face of ambiguity, refuse the temptation to guess."


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list