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'
|
>>> f'x={x'
|
||||||
File "<stdin>", line 1
|
File "<stdin>", line 1
|
||||||
SyntaxError: missing '}' in format string expression
|
SyntaxError: f-string: expecting '}'
|
||||||
|
|
||||||
Invalid expressions::
|
Invalid expressions::
|
||||||
|
|
||||||
>>> f'x={!x}'
|
>>> f'x={!x}'
|
||||||
File "<fstring>", line 1
|
File "<stdin>", line 1
|
||||||
!x
|
SyntaxError: f-string: empty expression not allowed
|
||||||
^
|
|
||||||
SyntaxError: invalid syntax
|
|
||||||
|
|
||||||
Run time errors occur when evaluating the expressions inside an
|
Run time errors occur when evaluating the expressions inside an
|
||||||
f-string. Note that an f-string can be evaluated multiple times, and
|
f-string. Note that an f-string can be evaluated multiple times, and
|
||||||
|
|
Loading…
Reference in New Issue