This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asmeurer
Recipients Anthony Sottile, asmeurer, eric.smith, pablogsal, terry.reedy
Date 2019-08-03.03:07:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This seems related. It's also possible I'm misunderstanding what is supposed to happen here.

If you create with just the 2 lines:


and run python from CPython master, you get

  File "/Users/aaronmeurer/Documents/cpython/", line 4
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:43asmeurersetrecipients: + asmeurer, terry.reedy, eric.smith, Anthony Sottile, pablogsal
2019-08-03 03:07:43asmeurersetmessageid: <>
2019-08-03 03:07:43asmeurerlinkissue37433 messages
2019-08-03 03:07:43asmeurercreate