You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid ambiguous backslashes in regular expression strings.
Sequences such as "\s" should be avoided in ordinary Python
strings due to the potential for confusion, and will result in
warnings in some Python versions.
For regular expressions, it's better to use raw strings (r"\s")
instead, which make parsing unambiguous without needing to double
backslashes.
(Since re.compile understands all the ordinary Python backslash
sequences, it should be safe to change non-raw regexp strings to
raw strings as long as they don't contain any escaped backslashes
or quotes.)
0 commit comments