[issue1184112] Missing trailing newline with comment raises SyntaxError
Pablo Torres Navarrete
report at bugs.python.org
Sun Jun 7 21:31:02 CEST 2009
Pablo Torres Navarrete <tn.pablo at gmail.com> added the comment:
Confirmed on versions 2.6.2, 3.0.1 and 3.1rc1. On the three of them, I
tried this:
>>> import parser
>>> test = 'def foo():\n\tpass\n\n# comment'
>>> parser.suite(test)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 4
# comment
^
SyntaxError: invalid syntax
>>>
----------
nosy: +ptn
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1184112>
_______________________________________
More information about the Python-bugs-list
mailing list