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
A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases. (Contributed by Emanuel Barry in bpo-27364.)
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
Note that the SyntaxWarnings will become SyntaxErrors in a future Python version.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Fix "invalid escape sequence" warnings before they become errors
Per Deprecated Python behavior in Python 3.6
In Python 3.12, invalid escape sequences started to generate a SyntaxWarning per Other Language Changes in Python 3.12:
Note that the SyntaxWarnings will become SyntaxErrors in a future Python version.
The text was updated successfully, but these errors were encountered: