In which versions is list.sort stable?

Alex Martelli aleax at aleax.it
Sat Apr 26 14:51:10 EDT 2003


Magnus Lie Hetland wrote:

> Has list.sort always been stable? Or, if not, in which Python versions
> is it not stable?

list.sort has not been stable in 1.5.2, 2.0.*, 2.1.*, 2.2.*.  I do not
know about previous versions.  Note that list.sort may once again cease
being stable (in 2.4.* or further versions) if the timbot dreams up one
that's even better on _other_ criteria -- stability's not going to
constrain his algorithm choices.


Alex





More information about the Python-list mailing list