New submission from Gerrit Holl <[email protected]>:
When there is a syntax error in a multi-line f-string, the arrow in the
reported syntax error points to the wrong line:
$ cat mwe.py
s = ("apricot "
"pineapple"
f"shallot{")
$ python mwe.py
File "mwe.py", line 1
s = ("apricot "
^
SyntaxError: f-string: expecting '}'
Tested with Python 3.7.4 and 3.8.2.
----------
components: Interpreter Core
messages: 367753
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: multi-line f-string, syntaxerror points to wrong line
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40449>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com