[Python-Dev] Utopian String Interpolation

Paul Prescod paul@prescod.net
Wed, 16 Jan 2002 13:59:17 -0800


Guido van Rossum wrote:
> 
>...
> 
> The "why" is that long ago Python didn't have raw strings but it did
> have regular expressions.  I thought it would be painful to have to
> double all backslashes used for the regex syntax.

Aha.

> It would be hard to change this policy now.

How about an optional warning which, after a year or so, would be turned
on by default, and then a year or so after that would be an error? 

This same issue may effect some eventual merging of literal strings and
Unicode literals because \N, \u etc. are treated differently in strings
than in Unicode literals. And even if literal strings and Unicode
strings are never merged, \N could be useful in ordinary strings.

 Paul Prescod