Issue 25206: fix f-string exceptions to match the code.
This commit is contained in:
parent
acf3f87883
commit
73a7b5b6bb
|
@ -398,15 +398,13 @@ Unmatched braces::
|
|||
|
||||
>>> f'x={x'
|
||||
File "<stdin>", line 1
|
||||
SyntaxError: missing '}' in format string expression
|
||||
SyntaxError: f-string: expecting '}'
|
||||
|
||||
Invalid expressions::
|
||||
|
||||
>>> f'x={!x}'
|
||||
File "<fstring>", line 1
|
||||
!x
|
||||
^
|
||||
SyntaxError: invalid syntax
|
||||
File "<stdin>", line 1
|
||||
SyntaxError: f-string: empty expression not allowed
|
||||
|
||||
Run time errors occur when evaluating the expressions inside an
|
||||
f-string. Note that an f-string can be evaluated multiple times, and
|
||||
|
|
Loading…
Reference in New Issue