[Python-ideas] Ruby-style Blocks in Python Idea

spir denis.spir at free.fr
Tue Mar 10 19:38:15 CET 2009

Le Tue, 10 Mar 2009 10:05:30 -0700,
Guido van Rossum <guido at python.org> s'exprima ainsi:

> On Tue, Mar 10, 2009 at 1:19 AM, spir <denis.spir at free.fr> wrote:
> > I do not agree with that. It is missing the point of lambdas. Lambdas are
> > snippets of code equivalent to expressions to be used in place. Lambdas
> > are *not* called, need not beeing callable, rather they are *used* by
> > higher order functions like map. The fact that they do not have any name
> > in syntax thus properly matches their semantic "anonymousity" ;-)
> Eh? On what planet do you live? What use is a lambda if it is never
> called? It will *eventually* be called -- if it is never called you
> might as well substitute None and your program would run the same.

Should have written: "called in code" (!). Thought it was obvious, sorry. It's executed indeed through the func it is passed to, but not (explicitely) called. The point I meant is: it is locally used -- not called from anywhere else -- the reason why it needs no name.

la vita e estrany

More information about the Python-ideas mailing list