Meador Inge added the comment:

The current behavior seems consistent with the lexical definition for
blank lines [1]:

"""
A logical line that contains only spaces, tabs, formfeeds and possibly a
comment, is ignored (i.e., no NEWLINE token is generated).
"""

NL and COMMENT are used for items that the CPython tokenizer
ignores (and are not really tokens).  Also, the test suite explicitly
tests for this case.

Perhaps the tokenize documentation should be updated
to say something like:

"""
NL tokens are generated when a logical line of code is continued over
multiple physical lines and for blank lines.
"""

[1] http://docs.python.org/3.4/reference/lexical_analysis.html#blank-lines

----------
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17061>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to