File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ character for the same purpose in string literals; for example, to match
2828a literal backslash, one might have to write ``'\\\\' `` as the pattern
2929string, because the regular expression must be ``\\ ``, and each
3030backslash must be expressed as ``\\ `` inside a regular Python string
31- literal.
31+ literal. Also, please note that any invalid escape sequences in Python's
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.
3235
3336The solution is to use Python's raw string notation for regular expression
3437patterns; backslashes are not handled in any special way in a string literal
You can’t perform that action at this time.
0 commit comments