[issue27471] sre_constants.error: bad escape \d

Serhiy Storchaka report at bugs.python.org
Sat Jul 9 01:23:04 EDT 2016


Serhiy Storchaka added the comment:

It is a deprection warning in 3.5.

$ python3.5 -Wd
>>> import re
>>> re.sub(re.escape(r'(\d+?)'), '(?:\d+?)', r'(\d+?)')
/usr/lib/python3.5/re.py:182: DeprecationWarning: bad escape \d
  return _compile(pattern, flags).sub(repl, string, count)
'(?:\\d+?)'

The warning was added in issue23622, and turned into exception in issue27030.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27471>
_______________________________________


More information about the Python-bugs-list mailing list