If you want X, you know where to find it (was Re: do...until wisdom needed...)

Tim Peters tim.one at home.com
Tue Apr 17 22:36:47 EDT 2001


[Benjamin.Altman]
> If Python is supposed to provide one obviously correct way of
> doing things why did they create the lambda notation?

[Alex Martelli]
> Historically, I believe, because some user way back
> when supplied patches for that and map/reduce/filter,
> and the normally very sensitive screens of our BDFL
> didn't trigger.
> ...
> Surely SOME old-timer who HAS been around throughout
> can give more solid info on this historical-interest-
> only item...?

Rest assured you've wrung all the blood there is to be squeezed out of this
particular rock.  From Misc/HISTORY:

    Lambda expressions are particularly useful in combination
    with map(), filter() and reduce(), described below.  Thanks
    to Amrit Prem for submitting this code (as well as map(),
    filter(), reduce() and xrange())!

under the notes for Release 1.0.0 (26 January 1994).

Python evolution was more, umm, surprising then.  I distinctly recall being
greatly surprised by the addition of lambda & friends -- they hadn't been
mentioned on the Python mailing list (this was pre-c.l.py, of course), so the
1.0.0 release notes were the first most of us heard of them.  In the years
since, Guido switched from calling them "minor conveniences" to "minor
annoyances".  I still think he's half right about that <wink>.





More information about the Python-list mailing list