Hacker News new | ask | show | jobs
by dragonwriter 1266 days ago
> Functions are first-class objects. If you want a multi-line lambda thats just a function.

Yes, lambdas are just anonymous functions that are restricted to a single expression, no statements. This is a problem for programming in functional style, because python idiomatically uses statements a lot, and doing a named definition for a single use function is more verbose and less readable in mant cases.

1 comments

My stylistic advice in that case would be to name it _lambda() (note the underscore that solves keyword issues). Though I don't disagree.