This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: error with backslash as last character in raw string
Type: compile error Stage:
Components: Interpreter Core Versions: Python 2.4, Python 2.3, Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: aka, draghuram
Priority: normal Keywords:

Created on 2008-02-25 20:18 by aka, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg62997 - (view) Author: (aka) Date: 2008-02-25 20:18
When creating a raw string ending with a backslash the systems answers
with an error:

>>> r'c:\'
SyntaxError: EOL while scanning single-quoted string

This happens on many systems with many versions, so it is propably a
problem of the interpreter itself.
msg62998 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-02-25 20:20
This is as per the design. Please see
http://www.python.org/doc/faq/general/#why-can-t-raw-strings-r-strings-end-with-a-backslash.
msg63052 - (view) Author: (aka) Date: 2008-02-26 19:32
Hello Raghuram,
thanks for your reply. I am sorry that I didn't find this description 
before posting the error. But, reading the description I still find the 
behaviour of the interpreter a bug ;-)

Regards, Axel

Raghuram Devarakonda schrieb:
> Raghuram Devarakonda added the comment:
> 
> This is as per the design. Please see
> http://www.python.org/doc/faq/general/#why-can-t-raw-strings-r-strings-end-with-a-backslash.
> 
> ----------
> nosy: +draghuram
> resolution:  -> invalid
> status: open -> closed
> 
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue2192>
> __________________________________
>
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46445
2008-02-26 19:32:26akasetmessages: + msg63052
2008-02-25 20:20:48draghuramsetstatus: open -> closed
resolution: not a bug
messages: + msg62998
nosy: + draghuram
2008-02-25 20:18:25akacreate