I know the lack of multiline lambdas is a common criticism of Python, but I've never really understood it.
Typing
someFunc( _ => {
// this is
// a function
// with multiple lines
})
Is only one line shorter than def foo ():
// this is
// a function
// with multiple lines
someFunc(foo)
There is a case to be made that the second version is more legible and that exposing the function foo makes unit testing it possible. I can understand why people might slightly prefer one or the other, but I honestly can't understand the intensity of opinion around this seemingly very minor syntactic difference.I'm curious what you find verbose about Python classes as:
class FooBar():
text = "Hello World!"
def hello(self):
return self.text
feels fairly terse to me.