Can I get a technical explanation on the following error
niklas.norrthon at hotmail.com
Mon May 25 11:22:11 CEST 2009
On 25 Maj, 05:29, Jim Garrison <j... at acm.org> wrote:
> And as an interesting exercise, try
> print r'test \'
> print r'test \\'
> Because of the way raw string parsing is defined, neither of these will
> pass the parser. In fact, a raw string cannot have a backslash as
> its last character.
>>> r'test \'
SyntaxError: EOL while scanning string literal
>>> r'test \\'
Second one is accepted. See the language reference section 2.4.1 as of
More information about the Python-list