Issue 25206: fix f-string exceptions to match the code.

This commit is contained in:
Eric V. Smith 2015-09-24 08:54:17 -04:00
parent acf3f87883
commit 73a7b5b6bb
1 changed files with 3 additions and 5 deletions

View File

@ -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