diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-04-30 13:16:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 13:16:27 +0300 |
commit | 3483299a24e41a7f2e958369cb3573d7c2253e33 (patch) | |
tree | f51b90e97184249f71c6df08579a2f4a8899d43a /Doc/reference | |
parent | a055dac0b45031878a8196a8735522de018491e3 (diff) | |
download | cpython3-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.rst | 5 |
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. |