[Python-bugs-list] [ python-Feature Requests-590115 ] please add list.stable_sort()

noreply@sourceforge.net noreply@sourceforge.net
Sun, 06 Oct 2002 09:37:58 -0700


Feature Requests item #590115, was opened at 2002-08-02 08:18
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=590115&group_id=5470

Category: Python Interpreter Core
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Markus F.X.J. Oberhumer (mfx)
Assigned to: Nobody/Anonymous (nobody)
Summary: please add list.stable_sort()

Initial Comment:
Now that we have a default stable list.sort() algorithm
in the CVS it would be very nice to guarantee some
stable-sorting for future (i.e. post 2.3) Python versions.

I therefore propose the addtion of a list method
stable_sort().

The motivation behind this is that I fear that sooner
or later Tim will find yet another major improvement in
the sort implementation that might no longer provide
stability <wink>

Currently, doing stable sorting "by hand" typically
involves using tuples with added index fields as keys,
which is more than suboptimal w.r.t perfomance, memory
and code cleanless.

Markus

----------------------------------------------------------------------

Comment By: Markus F.X.J. Oberhumer (mfx)
Date: 2002-09-13 07:40

Message:
Logged In: YES 
user_id=12151

Please close this request - it's superseded by my
python-stablesort package.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-08-02 20:19

Message:
Logged In: YES 
user_id=31435

Noting that Guido already rejected this idea.  Note that the 
word "stable" appears in the docstring for list.sort() in 2.3, 
but not before, so it's easy to check <wink>.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=590115&group_id=5470