r/Python • • Dec 19 '22

Intermediate Showcase multi line lambdas, as god intended

4 parallel universes ahead of the linter

codec abuse, part 2. https://github.com/dankeyy/superlambda.py

gl hf hope you like it

54 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Apr 16 '23

[removed] — view removed comment

1

u/whateverathrowaway00 Apr 16 '23

And yet, the reality of what you describe produced what many people, including you above, called a monstrosity.

I personally like them and wish python had them, but I agree with pythons designers that they can make things hard to read rapidly.

I also hate pythons lambda syntax, so I might not be the best one to ask here as my answer will be “their take is perfectly reasonable, but I agree with you and wish they had them.”

I’m also someone who really wishes python had braces. I’ve been a pythoner for quite some time, am even considered an expert in certain topics, but have yet to stop hating whitespace as syntax lol.

That said, to your point, no - having it named in fact does not produce that much cruft, nor is “compactness” generally a python core value, whereas readability is, so the decision is in line with their values. Again, I’d prefer if they went a different way, so I absolutely get what you’re saying and agree.