bug in parser?

N

Neal Becker

Isn't this a bug?

print \"

SyntaxError: unexpected character after line continuation character
 
G

Grant Edwards

Isn't this a bug?

print \"

SyntaxError: unexpected character after line continuation character

No.

http://www.google.com/search?q=python+line+continuation+character

First hit:

http://docs.python.org/reference/lexical_analysis.html

Section 2.1.5

Two or more physical lines may be joined into logical lines using
backslash characters (\), as follows: when a physical line ends in a
backslash that is not part of a string literal or comment, [...]
[...]
A backslash is illegal elsewhere on a line outside a string literal.

Anything else we can look up for you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top