[Python-checkins] peps: Issue 25206: fix f-string exceptions to match the code.
eric.smith
python-checkins at python.org
Thu Sep 24 14:54:38 CEST 2015
https://hg.python.org/peps/rev/7e32da8da58e
changeset: 6099:7e32da8da58e
user: Eric V. Smith <eric at trueblade.com>
date: Thu Sep 24 08:54:17 2015 -0400
summary:
Issue 25206: fix f-string exceptions to match the code.
files:
pep-0498.txt | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/pep-0498.txt b/pep-0498.txt
--- a/pep-0498.txt
+++ b/pep-0498.txt
@@ -398,15 +398,13 @@
>>> 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
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list