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

Optimal BPM report at bugs.python.org
Sat Sep 19 22:37:10 CEST 2015


Optimal BPM added the comment:

OK.
But just to make me understand, would that explain why an else statement gets its DEDENT before the else, instead of before an dedented comment just before it? 
Even if the comment is visually dedented as the else?

Example where tokenize returns the DEDENT in a separate place than where it is visually:

if a=b:
  statement
# Comment
else:
  other statement

In the above case, the DEDENT is reportet before the else, instead of before the comment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25079>
_______________________________________


More information about the docs mailing list