Author philiprowlands
Recipients chris.259263, cito, eric.smith, philiprowlands
Date 2019-12-15.01:50:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Status as of 3.9.0a1:

====== above appears fixed, i.e. reasonable error message.

$ ./python
  File "/home/bob/pybug/Python-3.9.0a1/", line 2
    hello = f"{world)}"
SyntaxError: f-string: unmatched ')'

====== is not as bad a initially reported, but still gives the wrong line number.

$ ./python
  File "<fstring>", line 1
SyntaxError: invalid syntax

And my own example which led me to this bug. The syntax error is on line 3, not line 1.

$ cat
s = f"{My favourite fruit is {apple}}"

$ ./python -V
Python 3.9.0a1

$ ./python
  File "<fstring>", line 1
    (My favourite fruit is {apple})
SyntaxError: invalid syntax
Date User Action Args
2019-12-15 01:50:50philiprowlandssetrecipients: + philiprowlands, cito, eric.smith, chris.259263
2019-12-15 01:50:50philiprowlandssetmessageid: <>
2019-12-15 01:50:50philiprowlandslinkissue31140 messages
2019-12-15 01:50:49philiprowlandscreate