Guido van Rossum <guido at python.org> wrote in news:200310141958.h9EJwFu24582 at 12-236-54-216.client.attbi.com: >> Don't you still need a tie-breaker index to preserve stability? > > No, because the sort algorithm is already stable. 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. You *could* preserve the stability by using a negative index when the list is to be reserved, but might it also be possible to get the special comparison object to invert the result of the comparison? -- Duncan Booth duncan at rcp.co.uk int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
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