diff options
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r-- | Lib/sre_parse.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index ab37fd3..6aa49c3 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -947,7 +947,9 @@ def parse_template(source, pattern): this = chr(ESCAPES[this][1]) except KeyError: if c in ASCIILETTERS: - raise s.error('bad escape %s' % this, len(this)) + import warnings + warnings.warn('bad escape %s' % this, + DeprecationWarning, stacklevel=4) lappend(this) else: lappend(this) |