Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#33 comment badly affects following line indentation

open
nobody
None
5
2005-07-18
2005-07-18
Mike Coleman
No

In code like this:

def foo():
x = 1
# indentation is wrong after this comment
y = 1

the 'y = 1' line is not properly indented. (Hitting
tab in this line does not fix it either.)

It seems like the indentation engine should ignore
comments.

(In case this form messes up whitespace, the 'x = 1'
line is indented and the others are not.)

Discussion