Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.

This commit is contained in:
Eric V. Smith 2016-09-09 21:56:20 -04:00
parent 052828db15
commit 451d0e38fc
9 changed files with 321 additions and 341 deletions

View file

@ -280,6 +280,6 @@ class saved_test_environment:
print(f"Warning -- {name} was modified by {self.testname}",
file=sys.stderr, flush=True)
if self.verbose > 1:
print(f" Before: {original}""\n"f" After: {current} ",
print(f" Before: {original}\n After: {current} ",
file=sys.stderr, flush=True)
return False