[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-28 Thread Optimal BPM
Optimal BPM added the comment: Ok, I'll work around that then. Thanks for your response! -- ___ Python tracker ___ ___ Python-bugs-li

[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-20 Thread Petr Viktorin
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: statement # Comment another statement both statements belong to the "if" block. In your example, the comment i

[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-19 Thread Optimal BPM
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

[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-12 Thread Stefan Krah
Stefan Krah added the comment: See: https://docs.python.org/3/reference/lexical_analysis.html#blank-lines -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python, skrah resolution: -> not a bug stage: -> resolved status: open -> closed type: behavi

[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-12 Thread Optimal BPM
New submission from Optimal BPM: Quoting the documentation: tokenize.NL Token value used to indicate a non-terminating newline. The NEWLINE token indicates the end of a logical line of Python code; NL tokens are generated when a logical line of code is continued over multiple physical lines.