Skip to content

Commit cda1d52

Browse files
authored
[3.11] Clarify re docs for byte pattern group names (GH-99308) (#101001)
Fix wording of the deprecation notice in re for 3.11
1 parent cc6ce90 commit cda1d52

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Doc/library/re.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ The special characters are:
419419
+---------------------------------------+----------------------------------+
420420

421421
.. deprecated:: 3.11
422-
Group names containing non-ASCII characters in bytes patterns.
422+
Group *name* containing characters outside the ASCII range
423+
(``b'\x00'``-``b'\x7f'``) in :class:`bytes` patterns.
423424

424425
.. index:: single: (?P=; in regular expressions
425426

@@ -495,6 +496,8 @@ The special characters are:
495496

496497
.. deprecated:: 3.11
497498
Group *id* containing anything except ASCII digits.
499+
Group *name* containing characters outside the ASCII range
500+
(``b'\x00'``-``b'\x7f'``) in :class:`bytes` replacement strings.
498501

499502

500503
The special sequences consist of ``'\'`` and a character from the list below.
@@ -1016,7 +1019,8 @@ Functions
10161019

10171020
.. deprecated:: 3.11
10181021
Group *id* containing anything except ASCII digits.
1019-
Group names containing non-ASCII characters in bytes replacement strings.
1022+
Group *name* containing characters outside the ASCII range
1023+
(``b'\x00'``-``b'\x7f'``) in :class:`bytes` replacement strings.
10201024

10211025

10221026
.. function:: subn(pattern, repl, string, count=0, flags=0)

0 commit comments

Comments
 (0)