Ah OK, I stand corrected. Whoops. I just read the web page and thought the
wrong thing, that makes sense.
> Think about it. A key= function is quite a different thing. It provides
a
> *temporary* comparison key while retaining the original value. IOW, your
> re-write is incorrect:
>
> >>> L =
[Roose]
> Actually I was just looking at Python 2.5 docs since you mentioned this.
>
> http://www.python.org/dev/doc/devel/whatsnew/node3.html
>
> It says min() and max() will gain a key function parameter, and sort()
> gained one in Python 2.4 (news to me).
It also appears in itertools.groupby()
> > Py2.5 is already going to include any() and all() as builtins. The
> > signature does not include a function, identity or otherwise.
> > Instead, the caller can
> > write a listcomp or genexp that evaluates to True or False:
> >
> > any(x >= 42 for x in data)
[Roose]
> Oh great, I just s