Lambda going out of fashion

Robert Brewer fumanchu at amor.org
Fri Dec 24 03:25:51 CET 2004


Stephen Thorne wrote:
> Lambdas contain only a single expression. Even the py3k
> wiki page ignores this critical difference. A single expression
> means no statements of any kind can be included. Assignment,
> if/elif/else, while, for, try/except, etc are not catered
> for in lambdas.

That's been the only serious use case I've had for lambdas: a way to have an Expression object, in effect. If we had a more rigorous syntax specifically for first-class expressions, lambda could go away forever in my book.


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org




More information about the Python-list mailing list