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