Closed Abrackadabra closed 2 weeks ago
Yeah, the docs should be more clear there—statement lambdas don't support multi-line statements that open a block below them (so basically any statement that ends in a colon), primarily because there isn't a nice syntax to handle them, as statement lambdas can appear inside of parentheses and whitespace inside of parentheses is supposed to be ignored.
Hi,
Loving the language!
The docs on statement lambdas say that
and
But I might be misunderstanding what that means exactly, since I'm getting syntax errors on any statement lambda that contains what Python's grammar defines as a compound statement, namely
So per docs something like this should work, but doesn't