Hacker Newsnew | comments | show | ask | jobs | submit login

Get an editor that shows whitespace.

(Non)Problem solved.

Not to mention you should indent your code exactly the same way (in a consistent format, either tabs or spaces) with how you'd indented Python code.




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.

-----


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

-----


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.

-----




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

Search: