[New-bugs-announce] [issue45086] f-string unmatched ']'

Greg Kuhn report at bugs.python.org
Thu Sep 2 10:55:20 EDT 2021


New submission from Greg Kuhn <gregorykuhn at gmail.com>:

Hi All, 
Is the below a bug? Shouldn't the interpreter be complaining about a curly brace?

$ python
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> num = 10
>>> f'[{num]'
  File "<stdin>", line 1
SyntaxError: f-string: unmatched ']'
>>>

----------
messages: 400920
nosy: Greg Kuhn
priority: normal
severity: normal
status: open
title: f-string unmatched ']'
type: behavior
versions: Python 3.8

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


More information about the New-bugs-announce mailing list