Skip to content

Commit 104de6c

Browse files
committed
Add link to exceptions
1 parent 2141e8e commit 104de6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/re.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ a literal backslash, one might have to write ``'\\\\'`` as the pattern
2929
string, because the regular expression must be ``\\``, and each
3030
backslash must be expressed as ``\\`` inside a regular Python string
3131
literal. Also, please note that any invalid escape sequences in Python's
32-
usage of the backslash in string literals now generate a DeprecationWarning
33-
and in the future this will become a SyntaxError. This behaviour will happen
34-
even if it is a valid escape sequence for a regular expression.
32+
usage of the backslash in string literals now generate a :exc:`DeprecationWarning`
33+
and in the future this will become a :exc:`SyntaxError`. This behaviour
34+
will happen even if it is a valid escape sequence for a regular expression.
3535

3636
The solution is to use Python's raw string notation for regular expression
3737
patterns; backslashes are not handled in any special way in a string literal

0 commit comments

Comments
 (0)