> > What about the situation where you want the list sorted in reverse order? > > If you simply sort and then reverse the list you've broken the stability. > > Yes, that's the same thing Alex Martelli brought up. You could also > supply a cmp function, as Geoffrey Talvola suggested (though this will > make the comparisons more costly). Oops. I misremembered Geoffrey's suggestion; he suggested two sorts with a reverse() call in between. I think that would have the same problem. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4