Skip to content

Commit

Permalink
[3.11] Clarify re docs for byte pattern group names (GH-99308) (#101001)
Browse files Browse the repository at this point in the history
Fix wording of the deprecation notice in re for 3.11
  • Loading branch information
Kentzo authored Mar 4, 2023
1 parent cc6ce90 commit cda1d52
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cda1d52

Please sign in to comment.