[New-bugs-announce] [issue1271] Raw string parsing fails with backslash as last character
Tim Gordon
report at bugs.python.org
Fri Oct 12 14:52:37 CEST 2007
New submission from Tim Gordon:
If you have a raw string with a backslash as the last character, the
parser thinks the following quote, actually used to mark the end of the
string, is being quoted by the backslash. For example, r'\' should be
the string with one backslash, but...
>>> print r'\'
SyntaxError: EOL while scanning single-quoted string
There seems to have been a fix added to python 3.0 (see issue 1720390),
but it doesn't look like it's been backtracked into any earlier version.
----------
components: Interpreter Core
messages: 56370
nosy: QuantumTim
severity: normal
status: open
title: Raw string parsing fails with backslash as last character
versions: Python 2.4, Python 2.5
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1271>
__________________________________
More information about the New-bugs-announce
mailing list