]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Clarify re docs for byte pattern group names (GH-99308) (#101001)
authorIlya Kulakov <kulakov.ilya@gmail.com>
Sat, 4 Mar 2023 21:36:42 +0000 (13:36 -0800)
committerGitHub <noreply@github.com>
Sat, 4 Mar 2023 21:36:42 +0000 (13:36 -0800)
Fix wording of the deprecation notice in re for 3.11

Doc/library/re.rst

index 7d8920169207fde445400deb2c2aa5988dea7e16..1f42cd28e65ec5965dca81bea3809a2d2bee308e 100644 (file)
@@ -419,7 +419,8 @@ The special characters are:
    +---------------------------------------+----------------------------------+
 
    .. deprecated:: 3.11
-      Group names containing non-ASCII characters in bytes patterns.
+      Group *name* containing characters outside the ASCII range
+      (``b'\x00'``-``b'\x7f'``) in :class:`bytes` patterns.
 
 .. index:: single: (?P=; in regular expressions
 
@@ -495,6 +496,8 @@ The special characters are:
 
    .. deprecated:: 3.11
       Group *id* containing anything except ASCII digits.
+      Group *name* containing characters outside the ASCII range
+      (``b'\x00'``-``b'\x7f'``) in :class:`bytes` replacement strings.
 
 
 The special sequences consist of ``'\'`` and a character from the list below.
@@ -1016,7 +1019,8 @@ Functions
 
    .. deprecated:: 3.11
       Group *id* containing anything except ASCII digits.
-      Group names containing non-ASCII characters in bytes replacement strings.
+      Group *name* containing characters outside the ASCII range
+      (``b'\x00'``-``b'\x7f'``) in :class:`bytes` replacement strings.
 
 
 .. function:: subn(pattern, repl, string, count=0, flags=0)