Unsorting(randomizing) a sequence

Fredrik Lundh fredrik at pythonware.com
Thu Aug 19 09:30:06 CEST 1999


Tim Peters <tim_one at email.msn.com> wrote:
> Python implements its own sort function (in 1.5.2 it's not quicksort, btw,
> but a hybrid of common special cases, binary insertion and samplesort).  A
> very long time ago it used the platform qsort, but that blew up on some
> systems; iirc, usually due to qsort being implemented non-reentrantly.  The
> current sort is robust against all that kind of stuff, including insane
> comparison functions; it always returns *some* permutation of its input.

how about JPython and Viper and Lumberjack
and SPython and FooPython and whatever...

as far as I can tell, the "spec" says 

    sort: sort the items of s in place

and that's about it...

</F>





More information about the Python-list mailing list