sorted() erraticly fails to sort string numbers
patrick.oloughlin at gmail.com
Thu Apr 30 17:11:35 CEST 2009
2009/4/30 Lie Ryan <lie.1296 at gmail.com>
> container[:] = sorted(container, key=getkey)
>> .... is equivalent to:
> Equivalent, and in fact better since the sorting is done in-place instead
> of creating a new list, then overwriting the old one.
Not when, as pointed out by uuid, container is not list-like (at least as
far as the sort() method goes).
"Ray, when someone asks you if you're a god, you say YES!"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list