summaryrefslogtreecommitdiffstats
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2016-09-03 13:18:34 (GMT)
committerEric V. Smith <eric@trueblade.com>2016-09-03 13:18:34 (GMT)
commit6a4efce7a50f1339dd67f892cc8746f5c1047ada (patch)
treedf1a4793f118436be8c701762579f7c716d1d2af /Lib/traceback.py
parent3b09cd64e0a7991bcb6d3f83a0a23be2fc81213f (diff)
downloadcpython-6a4efce7a50f1339dd67f892cc8746f5c1047ada.zip
cpython-6a4efce7a50f1339dd67f892cc8746f5c1047ada.tar.gz
cpython-6a4efce7a50f1339dd67f892cc8746f5c1047ada.tar.bz2
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
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 a1cb5fb..6fc6436 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