r/Python • • Mar 30 '11

Every. Single. Time.

Post image
0 Upvotes

58 comments sorted by

View all comments

9

u/[deleted] Mar 30 '11

I don't get it, what's the problem with removing trailing whitespace?

-1

u/voidptr Mar 30 '11

Say you have this code:

1    if this:
2        dothis()
3        dothat()
4
5        nowdoanotherthing()
6    else:
7        die()

If your editor removes the indentation from line 4, Python will kick an error.

4

u/[deleted] Mar 30 '11

I just checked, no it doesn't (Python 2.7).

2

u/emeryc Mar 30 '11

Just checked, python 2.5.4 and it works.

Did you try to do it in the interpreter? or in a file. Interpreter will not work, file will.