Is It Bug?
Chris “Kwpolska” Warrick
kwpolska at gmail.com
Sun Dec 8 05:01:47 EST 2013
On Sun, Dec 8, 2013 at 2:22 AM, Roy Smith <roy at panix.com> wrote:
> There's nothing you can do with raw strings that you can't do with
> regular strings, but they're easier to read when you start to use
> backslashes.
Unfortunately, there is one. A raw string cannot end with a backslash.
>>> r'a\a'
'a\\a'
>>> r'a\'
File "<stdin>", line 1
r'a\'
^
SyntaxError: EOL while scanning string literal
>>> r'\'
File "<stdin>", line 1
r'\'
^
SyntaxError: EOL while scanning string literal
--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
More information about the Python-list
mailing list