3 ms·
Limiting lambdas to a single expression makes functional programming in Python quite painful , along with the lack of a "let" block for temporary variables and
by blackbear_ 3y ago
Limiting lambdas to a single expression makes functional programming in Python quite painful , along with the lack of a "let" block for temporary variables and the removal (!!!) or argument unpacking which I am still mad about.
Syntax is definitely a problem, but I wonder if "looking Pythonic" needs to be such a huge roadblock.
- 082349872349872 3y agocomprehensions are (a) expressions and (b) bind
- blackbear_ 3y agoYes, I've used list comprehension for temporary variables and chaining expressions together. But you can't tell me that's in any way "Pythonic" :)
- 082349872349872 3y agoTrue; a while ago I sent someone a script written in my idiolect and he replied that I really ought to know where Common Lisp was, if I wanted it. Transpiling to comprehensions is, however, a great way to get access to arbitrary python libraries from experimental languages.