gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668)

This commit is contained in:
Serhiy Storchaka 2022-04-30 13:16:27 +03:00 committed by GitHub
parent a055dac0b4
commit 3483299a24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 139 additions and 18 deletions

View file

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