Skip to content

Commit e76f45c

Browse files
committed
DeprecationWarning->SyntaxWarning already happened in 3.12
1 parent 4b78880 commit e76f45c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/howto/regex.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ expressions will often be written in Python code using this raw string notation.
335335

336336
In addition, special escape sequences that are valid in regular expressions,
337337
but not valid as Python string literals, now result in a
338-
:exc:`DeprecationWarning` and will eventually become a :exc:`SyntaxError`,
338+
:exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`,
339339
which means the sequences will be invalid if raw string notation or escaping
340340
the backslashes isn't used.
341341

@@ -473,7 +473,7 @@ Two pattern methods return all of the matches for a pattern.
473473
The ``r`` prefix, making the literal a raw string literal, is needed in this
474474
example because escape sequences in a normal "cooked" string literal that are
475475
not recognized by Python, as opposed to regular expressions, now result in a
476-
:exc:`DeprecationWarning` and will eventually become a :exc:`SyntaxError`. See
476+
:exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`. See
477477
:ref:`the-backslash-plague`.
478478

479479
:meth:`~re.Pattern.findall` has to create the entire list before it can be returned as the

0 commit comments

Comments
 (0)