Back Slash not allowed at the end of raw string?

Peter Otten __peter__ at web.de
Fri Nov 10 09:05:52 EST 2006


yuhao wrote:

> I'm using Python 2.5 on Windows XP Pro.
> While testing for strings, I got the following result:
> 
>>>> r'c:\'
> SyntaxError: EOL while scanning single-quoted string

> what does this message mean? I'm not using any single quote in the
> statement. It this a bug or by design?

http://effbot.org/pyfaq/why-can-t-raw-strings-r-strings-end-with-a-backslash.htm




More information about the Python-list mailing list