bug in parser?

Grant Edwards invalid at invalid.invalid
Sun Jun 20 19:34:02 EDT 2010


On 2010-06-20, Neal Becker <ndbecker2 at gmail.com> wrote:
> 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?

-- 
Grant







More information about the Python-list mailing list