[Tutor] Finding the shortest word in a list of words

Kent Johnson kent37 at tds.net
Tue Jan 20 14:27:56 CET 2009

On Tue, Jan 20, 2009 at 7:13 AM, Emad Nawfal (عماد نوفل)
<emadnawfal at gmail.com> wrote:
> 2009/1/20 Kent Johnson <kent37 at tds.net>
>> decorate-sort-undecorate is pretty much obsolete since the key=
>> parameter was added to sort() in Python 2.4.

> When you say that something is obsolete, what does this mean? Is that just
> because there is a simpler way, or are there other technical considerations?

In this case, it is because there is a better, simpler way.
Decorate-sort-undecorate used to be the recommended way to sort on a
key; now key= is preferred.


More information about the Tutor mailing list