[Python-Dev] decorate-sort-undecorate

Moore, Paul Paul.Moore at atosorigin.com
Tue Oct 14 05:31:42 EDT 2003


From: Raymond Hettinger [mailto:python at rcn.com]
> I've got a first draft patch (sans docs and tests) loaded at:
>    www.python.org/sf/823292
>
> The argument keywords are: cmpfunc, key, reverse

Can I just clarify the meaning of reverse (the original posting
was a little unclear)? I think that

    l.sort(reverse=True)

should mean the same as

    l.sort()
    l.reverse()

(ie, both sort and reverse inplace, with a void return). The
original posting gave me the impression that a copy would be
done (which I don't think is necessary).

Paul.



More information about the Python-Dev mailing list