|
|
|
|
|
by mijamo
2898 days ago
|
|
Nononono God please NO! I would KILL not to make that happen. So many devs abuse those in every language that has that. Even lambas get sometimes abused in Python (and I have a few examples in our codebase unfortunately). Expanding lambdas' scope is the LAST thing I want in Python, this would just lead to worst codebases, with nearly 0 benefit. If you want to do something that needs 2 expressions, just create a goddamn function and name it for god's sake. Sorry but I had to say it, I think the lambda limitations is one of my favorite feature in Python. |
|
It could and could also not be useful to give names to all the subexpressions in the following
w = a(b(c(x,y),z))
You could impose a limitation on how many function can be in a single expression, forcing you to give names. That's analogous to your favorite feature, no?