Question on lambdas
Ben Finney
ben+python at benfinney.id.au
Tue Dec 9 00:23:08 EST 2014
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.
--
\ “Here is a test to see if your mission on earth is finished. If |
`\ you are alive, it isn't.” —Francis Bacon |
_o__) |
Ben Finney
More information about the Python-list
mailing list