[docs] [issue25079] Tokenize generates NL instead of NEWLINE for comments

Petr Viktorin report at bugs.python.org
Sun Sep 20 11:30:17 CEST 2015

Petr Viktorin added the comment:

As it says in the docs, a "logical line that contains only spaces, tabs, formfeeds and possibly a comment, is ignored."

If you write:

if a=b:
# Comment
    another statement

both statements belong to the "if" block.
In your example, the comment is similarly part of the "if" block, so the dedent comes after it.

nosy: +encukou

Python tracker <report at bugs.python.org>

More information about the docs mailing list