aboutsummaryrefslogtreecommitdiff
path: root/Doc/reference
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-04-30 13:16:27 +0300
committerGitHub <noreply@github.com>2022-04-30 13:16:27 +0300
commit3483299a24e41a7f2e958369cb3573d7c2253e33 (patch)
treef51b90e97184249f71c6df08579a2f4a8899d43a /Doc/reference
parenta055dac0b45031878a8196a8735522de018491e3 (diff)
downloadcpython3-3483299a24e41a7f2e958369cb3573d7c2253e33.tar.gz
gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668)
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/lexical_analysis.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index dba1a9dd2e..0e64a056a6 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -596,6 +596,11 @@ Notes:
(1)
As in Standard C, up to three octal digits are accepted.
+ .. versionchanged:: 3.11
+ Octal escapes with value larger than ``0o377`` produce a :exc:`DeprecationWarning`.
+ In a future Python version they will be a :exc:`SyntaxWarning` and
+ eventually a :exc:`SyntaxError`.
+
(2)
Unlike in Standard C, exactly two hex digits are required.