[issue1271] Raw string parsing fails with backslash as last character

Georg Brandl report at bugs.python.org
Fri Oct 12 18:15:25 CEST 2007


Georg Brandl added the comment:

There's more to allowing \ at the end of a raw string: if you do that,
the raw string will end at the first quote character which is the same
as the opening one, so you can't put such a quote character into a raw
string anymore. At the moment, you can, by escaping it with a backslash,
though the backslash is left in the string.

There are basically two main uses for raw strings: Windows path names
and regular expressions. The current situation is optimal for the
latter: you can put both quote characters in a raw string, and the
backslash needed to quote the "string quote" being retained is not a
problem.

----------
nosy: +georg.brandl

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1271>
__________________________________


More information about the Python-bugs-list mailing list