[New-bugs-announce] [issue1271] Raw string parsing fails with backslash as last character
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
title: Raw string parsing fails with backslash as last character
versions: Python 2.4, Python 2.5
Tracker <report at bugs.python.org>
More information about the New-bugs-announce