Hacker News new | ask | show | jobs
by ivanjr0 3083 days ago
> Lambdas in Python are awkward

Can you elaborate on that, please?

Considering the examples given by the author, I think they would be a better option.

1 comments

Not the OP but I think he was referring to the restrictions python puts on lambda expressions:

- they can only contain a single expression

- they cannot contain statements

Python has lambdas that have multiple expressions and statements.

They're called functions.

Python functions aren't anonymous
For precondition checking, shouldn’t that suffice?
Depends on the precondition.