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/054350.html below:

[Python-Dev] Recommend accepting PEP 312 --SimpleImplicit Lambda

[Python-Dev] Recommend accepting PEP 312 --SimpleImplicit Lambda [Python-Dev] Recommend accepting PEP 312 --SimpleImplicit LambdaRaymond Hettinger python at rcn.com
Sun Jun 19 05:28:51 CEST 2005
> [Donovan Baarda]
> > 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])

[Me]
> This approach is entirely too obvious.  If we want to be on the
leading
> edge, we can't be copying what was done years ago in Lua. ;-)

Despite the glib comment, the idea as presented doesn't work because it
mixes statement and expression semantics (the inner 'return' is at best
unpleasant).  Also, the naming is off -- 'def' defines some variable
name. In Lua, the 'def' is called 'function' which doesn't imply a
variable assignment.


Raymond
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