Question on lambdas

Christoph M. Becker cmbecker69 at arcor.de
Tue Dec 9 07:43:10 EST 2014


Ben Finney wrote:

> Christoph Becker <cmbecker69 at gmx.de> writes:
> 
>> Ben Finney wrote:
>>
>>> It's best to remember that ‘lambda’ is syntactic sugar for creating
>>> a function; the things it creates are not special in any way, they
>>> are normal functions, not “lambdas”.
>>
>> Could you please elaborate why ‘lambda’ does not create “lambdas”. I'm
>> a Python beginner (not new to programming, though), and rather
>> confused about your statement.
> 
> We already have a term for what the ‘lambda’ keyword creates: a
> function.
>
> That is, ‘lambda’ creates a function object, without anything to
> distinguish it from a function created any other way.

Ah, now I understand.  It's "just" about proper naming.  Thanks. :)

-- 
Christoph M. Becker



More information about the Python-list mailing list