Ideas for Python 3

John Roth newsgroups at jhrothjr.com
Thu May 6 08:07:23 EDT 2004


"Josiah Carlson" <jcarlson at uci.edu> wrote in message
news:c7clt9$r3k$1 at news.service.uci.edu...
>
> > In my humble opinion, GvR should have ignored the experts who told him
> > lambdas were great, and just applied some simple common sense to find
> > a better solution.
>
> I don't believe that lambdas were a solution to a problem.  I believe
> the /desire/ was to have a way of defining simple functions in a general
> fashion.  They do just that, allow simple functions to be defined in a
> general fashion, albeit using a slightly altered function syntax.  Their
> ability to be placed in lists, gain names, etc., was a side-effect of
> them being Python objects.

If I remember my Python history correctly, they showed up as part
of a "functional programming" package that included map, filter, apply
and reduce. The term "lambda" comes from that heritage.

I agree with the other comments in this thread that indicate that
lambdas are poorly explained, although the explanation in the tutorial
isn't bad.

They are also widely misused in callback function examples where
bound methods would be much more appropriate.

John Roth
>
>   - Josiah





More information about the Python-list mailing list