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 Erik Cederstrand
Recipients Erik Cederstrand
Date 2019-12-04.08:27:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When I have a normal syntax error in a file, Python reports the filename in the exception output:

$ cat 

$ python3.8 
  File "", line 1
SyntaxError: invalid hexadecimal literal

But if the syntax error is inside an f-string, Python reports 'File "<fstring>"' instead of the actual filename in the exception output.

$ cat 
f'This is a syntax error: {0x=5}'

$ python3.8 
  File "<fstring>", line 1
SyntaxError: invalid hexadecimal literal
Date User Action Args
2019-12-04 08:27:53Erik Cederstrandsetrecipients: + Erik Cederstrand
2019-12-04 08:27:53Erik Cederstrandsetmessageid: <>
2019-12-04 08:27:53Erik Cederstrandlinkissue38964 messages
2019-12-04 08:27:53Erik Cederstrandcreate