24 Feb
2021
24 Feb
'21
7:34 p.m.
On Tue, Feb 23, 2021, at 17:01, Rob Cliffe via Python-ideas wrote:
As far as I know, there is no case of valid syntax using 'lambda' where replacing 'lambda' by 'def' results in valid syntax. Can anyone provide a counter-example? If not, I would support allowing 'def' as an alternative to 'lambda' (allowing 'def' to ultimately become the recommended usage).
I have an objection to this: "def" is short for define, and a lambda does not produce a definition. This isn't just about saving keystrokes, and even if it were, saving only three would not be worth it for a syntax that is just as confusing as the existing one.