Message310300
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. |
|
Date |
User |
Action |
Args |
2018-01-19 23:20:51 | cheryl.sabella | set | recipients:
+ cheryl.sabella, docs@python |
2018-01-19 23:20:51 | cheryl.sabella | set | messageid: <1516404051.77.0.467229070634.issue32603@psf.upfronthosting.co.za> |
2018-01-19 23:20:51 | cheryl.sabella | link | issue32603 messages |
2018-01-19 23:20:51 | cheryl.sabella | create | |
|