summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-19 14:42:06 (GMT)
committerGitHub <noreply@github.com>2018-10-19 14:42:06 (GMT)
commit6543912c90ffa579dc4c01e811f9609cf92197d3 (patch)
tree44f433f463ad6624814d0f3c556501eeefb862b8 /Doc/reference
parent209144831b0a19715bda3bd72b14a3e6192d9cc1 (diff)
downloadcpython-6543912c90ffa579dc4c01e811f9609cf92197d3.zip
cpython-6543912c90ffa579dc4c01e811f9609cf92197d3.tar.gz
cpython-6543912c90ffa579dc4c01e811f9609cf92197d3.tar.bz2
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
for invalid escape sequences in string and bytes literals.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/lexical_analysis.rst7
1 files changed, 5 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