[New-bugs-announce] [issue46260] Misleading SyntaxError on f-string

Matt Delengowski report at bugs.python.org
Tue Jan 4 15:31:12 EST 2022

New submission from Matt Delengowski <matt.delengowski at gmail.com>:

Example code

foo = 1
f"blank (open paren {foo )"

Error report

  File "<stdin>", line 1
    f"blank (open paren {foo )"
SyntaxError: f-string: unmatched ')'

The problem is due to unmatched '}' however.

components: Parser
messages: 409709
nosy: Delengowski, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Misleading SyntaxError on f-string
type: behavior
versions: Python 3.10

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list