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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1271>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to