summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/lexical_analysis.rst7
-rw-r--r--Doc/whatsnew/3.8.rst6
2 files changed, 11 insertions, 2 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index 84e8c78..e1d88ef 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -559,8 +559,11 @@ escape sequences only recognized in string literals fall into the category of
unrecognized escapes for bytes literals.
.. versionchanged:: 3.6
- Unrecognized escape sequences produce a DeprecationWarning. In
- some future version of Python they will be a SyntaxError.
+ Unrecognized escape sequences produce a :exc:`DeprecationWarning`.
+
+ .. versionchanged:: 3.8
+ Unrecognized escape sequences produce a :exc:`SyntaxWarning`. In
+ some future version of Python they will be a :exc:`SyntaxError`.
Even in a raw literal, quotes can be escaped with a backslash, but the
backslash remains in the result; for example, ``r"\""`` is a valid string
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index bd3283c..e522add 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -107,6 +107,12 @@ Other Language Changes
and :keyword:`return` statements.
(Contributed by David Cuthbert and Jordan Chapman in :issue:`32117`.)
+* A backslash-character pair that is not a valid escape sequence generates
+ a :exc:`DeprecationWarning` since Python 3.6. In Python 3.8 it generates
+ a :exc:`SyntaxWarning` instead.
+ (Contributed by Serhiy Storchaka in :issue:`32912`.)
+
+
New Modules
===========