[Nick Coghlan] ... > Python 2.3 has a stable sort, and Python 2.4 brought the guarantee that it > shall > remain that way. I'm not sure about Python 2.2 and earlier.
No list.sort() implementation before 2.3 was stable. It was confusing, though, because the samplesort/binary_insertion_sort hybrid Python used for the 4 years preceding 2.3 *was* stable for all "small enough" lists. More than one person got fooled by guessing that stability observed in small test cases meant it was always stable. -- http://mail.python.org/mailman/listinfo/python-list