Menu

#33 comment badly affects following line indentation

open
nobody
None
5
2005-07-18
2005-07-18
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


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.