8 ms·
Pedant here. The fact that a Python lambda cannot be multi-line is not directly related to the whitespace thing. After all, it's easy to put several statements
by ewiethoff 18y ago
Pedant here. The fact that a Python lambda cannot be multi-line is not directly related to the whitespace thing. After all, it's easy to put several statements on one line by separating them with semicolons. No, the issue is, a Python lambda cannot include any statements; it can only contain an expression. Expressions and statements are different animals in Python. That's a fundamental issue.