A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054368.html below:

[Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

[Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit LambdaSkip Montanaro skip at pobox.com
Sun Jun 19 15:45:24 CEST 2005
    >> As I see it, a lambda is an anonymous function. An anonymous function
    >> is a function without a name. We already have a syntax for a
    >> function...  why not use it. ie:
    >> 
    >> f = filter(def (a): return a > 1, [1,2,3])

    Kay> You mix expressions with statements. 

You could remove the "return" and restrict the body of the def to an
expression: 

    f = filter(def (a): a > 1, [1,2,3])

That looks almost exactly like a lambda, but uses "def" and parenthesizes
the argument list. It seems to me that would remind people "this is a
function".

Skip
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4