[issue40449] multi-line f-string, syntaxerror points to wrong line

Lysandros Nikolaou report at bugs.python.org
Sat May 2 06:23:39 EDT 2020


Lysandros Nikolaou <lisandrosnik at gmail.com> added the comment:

This has been fixed in 3.9.0a6 due to the new parser:

╰─ cat a.py
s = ("apricot "
     "pineapple"
     f"shallot{")
╰─ ./python.exe a.py
  File "/Users/lysnikolaou/Repositories/cpython/a.py", line 3
    f"shallot{")
               ^
SyntaxError: f-string: expecting '}'

----------
nosy: +lys.nikolaou

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40449>
_______________________________________


More information about the Python-bugs-list mailing list