Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

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