Message348938
This seems related. It's also possible I'm misunderstanding what is supposed to happen here.
If you create test.py with just the 2 lines:
"""
a
and run python test.py from CPython master, you get
$./python.exe test.py
File "/Users/aaronmeurer/Documents/cpython/test.py", line 4
a
^
SyntaxError: EOF while scanning triple-quoted string literal
Notice that it reports line 4 even though the file only has 2 lines.
The offset in the syntax error is 6 columns (line numbers and column offsets
in SyntaxErrors count from 1)
>>> try:
... compile('"""\na', '<none>', 'exec')
... except SyntaxError as e:
... print(repr(e))
...
SyntaxError('EOF while scanning triple-quoted string literal', ('<none>', 2, 6, '"""\na\n')) |
|
Date |
User |
Action |
Args |
2019-08-03 03:07:43 | asmeurer | set | recipients:
+ asmeurer, terry.reedy, eric.smith, Anthony Sottile, pablogsal |
2019-08-03 03:07:43 | asmeurer | set | messageid: <1564801663.56.0.364677103857.issue37433@roundup.psfhosted.org> |
2019-08-03 03:07:43 | asmeurer | link | issue37433 messages |
2019-08-03 03:07:43 | asmeurer | create | |
|