Is It Bug?
rosuav at gmail.com
Sun Dec 8 11:26:39 CET 2013
On Sun, Dec 8, 2013 at 9:01 PM, Chris “Kwpolska” Warrick
<kwpolska at gmail.com> wrote:
> A raw string cannot end with a backslash.
> File "<stdin>", line 1
> SyntaxError: EOL while scanning string literal
Incidentally, the solution to this would be to not use the backslash
to escape the quote. That's what introduces the ambiguity. Instead, a
raw literal could do as REXX does and double the quote to escape it.
(Any whitespace and it's still concatenation as normal. I'm not
advocating REXX's handling there.)
If we had a new "pure string" that worked thus:
which would be a regex matching quoted strings of digits. The only
potential ambiguity would be in that closing the quote and opening
another would normally revert to a regular string literal, where by
this model it's still a pure string. Editor lexers would have to
More information about the Python-list