list.sort(cmpfunc) question

Aahz Maruch aahz at panix.com
Fri Mar 16 18:46:37 EST 2001


In article <3ab2a132 at si-nic.hrz.uni-siegen.de>,
Simon Budig  <Simon.Budig at unix-ag.org> wrote:
>
>As a related question since I did not find it in the documentation:
>
>Is the sort-function guaranteed to be stable? Does it keep the order,
>when cmpfunc returns 0 for a pair of items?

IIRC, the current implementation is stable but is not guaranteed to be
stable.
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Three sins: BJ, B&J, B&J



More information about the Python-list mailing list