5 ms·
It isn't totally solved. For example, you cannot write a lambda that contains a line-break. Its not a big problem, but it is a trade-off.
by jeremyjh 14y ago
It isn't totally solved. For example, you cannot write a lambda that contains a line-break. Its not a big problem, but it is a trade-off.
- nnq 14y agosignificant whitespace is not why you cannot write a lambda that contains a line-break. the problems are not really related. just ditch the difference between statements and expressions and allow multi-line expressions. true, then it will no longer be Python but a whole different language :)
- brendoncrawford 14y agoPut this in a text editor and run it in python: print(reduce((lambda x, y: x + y), xrange(10))) print(reduce((lambda x, y: x + \ y), xrange(10))) HINT: It runs.