Python 3.0, rich comparisons and sorting order
FBatista at uniFON.com.ar
Tue Sep 21 20:14:02 CEST 2004
#- 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).
You could also do that passing a function to sort().
#- sort() should work regardless of the list elements, and return a
#- reasonable result, even if not strictly correct in the numerical
Define "reasonable result" with different datatypes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list