4 ms·
It looks like you changed "lambda" to "def" and added parentheses. It seems like that feature is already there...
by recursive 15y ago
It looks like you changed "lambda" to "def" and added parentheses. It seems like that feature is already there...
- lucian1900 15y agoPerhaps my example was crap. They would also allow anything inside them.
- sirclueless 15y agoThe problem with multiline lambdas it that no one knows a good way to indent them. If they weren't butt-ugly python would probably already have them.
- stcredzero 15y ago"The problem with multiline lambdas in Python is that no one knows a good way to indent them." How about new keyword(s)? "begin" and "end"? I imagine this has thoroughly been discussed ad-nauseum. Is there a good synopsis?
- recursive 15y agoBasically, there is no scope or block ending token anywhere else in python. And Guido thinks inline multi-line anonymous functions make programs harder to understand.
- lucian1900 15y agoI'm not sure it's that big a problem. CoffeeScript handles this pretty well using indentation. CS has ambiguous cases because of optional ( ), but that wouldn't be the case with Python anyway.