Unrecognized escape sequences in string literals
python at mrabarnett.plus.com
Mon Aug 10 13:41:08 CEST 2009
Steven D'Aprano wrote:
> On Sun, 09 Aug 2009 17:56:55 -0700, Douglas Alan wrote:
>> My point of view is that
>> every language has *some* warts; Python just has a bit fewer than most.
>> It would have been nice, I should think, if this wart had been "fixed"
>> in Python 3, as I do consider it to be a minor wart.
> And if anyone had cared enough to raise it a couple of years back, it
> possibly might have been.
My preference would've been that a backslash followed by A-Z, a-z, or
0-9 is special, but a backslash followed by any other character is just
the character, except for backslash followed by a newline, which
suppresses the newline.
I would also have preferred a backslash in a raw string to always be a
Ah well, something for Python 4.x. :-)
More information about the Python-list