[Python-Dev] Backslash at end of raw string (original) (raw)
Rob Cliffe rob.cliffe at btinternet.com
Sat Dec 12 09:36:34 CET 2009
- Previous message: [Python-Dev] Splitting something into two steps produces different behavior from doing it in one fell swoop in Python 2.6.2
- Next message: [Python-Dev] Backslash at end of raw string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Python (e.g. 2.5) does not accept a backslash as the LAST character of a raw string:
r"" File "", line 1 r"" ^ Syntax Error: EOL while scanning single-quoted string.
path = r'\MyDir\MySubDir' # raises same error path = r'\MyDir\MySubDir' # no error
Isn't this a bug?
Rob Cliffe -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20091212/a8afb55b/attachment.htm>
- Previous message: [Python-Dev] Splitting something into two steps produces different behavior from doing it in one fell swoop in Python 2.6.2
- Next message: [Python-Dev] Backslash at end of raw string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]