Re: Tcl/Lisp/Python: A "User" point of view

Guido.van.Rossum@cwi.nl
Wed, 28 Sep 1994 11:15:37 +0100

> Note that functions created with lambda forms cannot contain
> statements.
>
> Supposedly these features were created by popular demand. So which one
> of you demanded these eviscerated lambdas?

Nobody did. Lambda forms in Python provide ABSOLUTELY NO NEW
FUNCTIONALITY -- all they provide is a shorthand notation if you're
too lazy to define a function. Since functions are already first
class objects in Python, and can be declared in a local scope, the
only advantage of using a lambda form instead of a locally-defined
function is that you'll have to invent a name for the function -- but
that's just a local variable to which the function object (which is
exactly the same type of object that a lambda form yields) is
assigned.

Python lambda forms cannot contain statements because Python's
syntactic framework can't handle statements nested inside functions
(nor the mindset of most programmers :-).

--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>