Hacker News new | comments | show | ask | jobs | submit login

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.



Put 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.


significant 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 :)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: