summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2016-09-09 21:56:20 -0400
committerEric V. Smith <eric@trueblade.com>2016-09-09 21:56:20 -0400
commit451d0e38fcf50d976236d7d00ccfe8c1a2305086 (patch)
tree29e15833e76714f8f0f8b906871b82c8c1a42967 /Lib/traceback.py
parent052828db1538bf0d42d7e256da13c6e183974a13 (diff)
downloadcpython-git-451d0e38fcf50d976236d7d00ccfe8c1a2305086.tar.gz
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.
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index a15b818565..a1cb5fb1ef 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -402,7 +402,7 @@ class StackSummary(list):
count += 1
else:
if count > 3:
- result.append(f' [Previous line repeated {count-3} more times]'+'\n')
+ result.append(f' [Previous line repeated {count-3} more times]\n')
last_file = frame.filename
last_line = frame.lineno
last_name = frame.name
@@ -419,7 +419,7 @@ class StackSummary(list):
row.append(' {name} = {value}\n'.format(name=name, value=value))
result.append(''.join(row))
if count > 3:
- result.append(f' [Previous line repeated {count-3} more times]'+'\n')
+ result.append(f' [Previous line repeated {count-3} more times]\n')
return result