[Python-3000] lambda

Talin talin at acm.org
Wed Mar 26 03:01:32 CET 2008


Olivier Verdier wrote:
> Any thoughts about that? Any ideas of other better names than "lambda"?

A while back I created and proposed a patch that would change the syntax 
of lambda to be more like a generator expression. So instead of writing:

    lambda x: x * x

you would write:

    (x * x given x)

So for example:

    >>> (x * x given x)(2)
    4

However, the patch and the general concept were rejected. For myself, I 
thought the idea was cute, but not a huge improvement, and I'm not 
willing to spend any serious effort lobbying for it.

-- Talin


More information about the Python-3000 mailing list