In which versions is list.sort stable?

Aahz aahz at pythoncraft.com
Sat Apr 26 15:37:45 EDT 2003


In article <yyAqa.8330$3M4.231032 at news1.tin.it>,
Alex Martelli  <aleax at aleax.it> wrote:
>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.

OTOH, Uncle Timmy won't gratuitously remove stability, either.  But I
still wouldn't bet on Python's sort staying stable past 2.3.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"In many ways, it's a dull language, borrowing solid old concepts from
many other languages & styles:  boring syntax, unsurprising semantics,
few automatic coercions, etc etc.  But that's one of the things I like
about it."  --Tim Peters on Python, 16 Sep 93




More information about the Python-list mailing list