This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cheryl.sabella
Recipients cheryl.sabella, docs@python
Date 2018-01-19.23:20:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516404051.77.0.467229070634.issue32603@psf.upfronthosting.co.za>
In-reply-to
Content
I apologize if this is a duplicate question, but I couldn't find another issue about this.  It's hard to search on 're'.

In 3.7, I get a deprecation warning when using a regular string with re escape characters:
>>> s = '123abcd'
>>> re.findall('\d', s)
<stdin>:1: DeprecationWarning: invalid escape sequence \d
['1', '2', '3']

Of course, this works:
>>> s = '123abcd'
>>> re.findall(r'\d', s)
['1', '2', '3']


I know that the documentation strongly suggests using raw strings with re, but I didn't see anywhere mentioning that it would be a requirement.  I would think this would break a lot of 're' code.
History
Date User Action Args
2018-01-19 23:20:51cheryl.sabellasetrecipients: + cheryl.sabella, docs@python
2018-01-19 23:20:51cheryl.sabellasetmessageid: <1516404051.77.0.467229070634.issue32603@psf.upfronthosting.co.za>
2018-01-19 23:20:51cheryl.sabellalinkissue32603 messages
2018-01-19 23:20:51cheryl.sabellacreate