Oct. 11, 2012
12:07 a.m.
On 11/10/12 07:04, Serhiy Storchaka wrote:
On 10.10.12 22:46, Antoine Pitrou wrote:
-1. This will make life more difficult with regular expressions (and produce lots of spurious warnings in existing code).
Strings for regular expressions always should be raw.
Why? The re module doesn't care how you construct the strings. It *can't* care how you construct the strings. Something like re.search('\D*', 'abcd1234xyz') works perfectly well and there is no need for a raw string. Any requirement to "always use raw strings" is a style issue, not a language issue. -- Steven