New submission from undefined <undefined@...>:
this was reported as an addendum to issue 1354 where the original issue
was resolved, but this specific issue wasn't.
Jython 2.5rc3+ (trunk:6440, Jun 3 2009, 16:56:43)
[OpenJDK Client VM (Sun Microsystems Inc.)] on java1.6.0_0
$ jython/dist/bin/jython continuation.py
This is a rather long string containing
several lines of text just as you would do in C.
Note that whitespace at the beginning of the line is significant.
$ jython/dist/bin/jython <continuation.py
File "<stdin>", line 2
SyntaxError: mismatched character '<EOF>' expecting '"'
File "<stdin>", line 1
several lines of text just as you would do in C.\n\
^
SyntaxError: mismatched character 'n' expecting '\n'
File "<stdin>", line 0
SyntaxError: unexpected character after line continuation character
File "<stdin>", line 1
significant."
^
SyntaxError: no viable alternative at character '\n'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'hello' is not defined
NOTE: same thing happens when typing the text into the interactive
interpreter, but it's easier to demonstrated reading the text on stdin
from a file.
i presume this is a parser problem like issue 1354 since the problem is
only seen when parsing input from the interactive interpreter.
----------
components: Core
files: continuation.py
messages: 4787
nosy: undefined
severity: normal
status: open
title: continuation lines fail in interactive interpreter
type: behaviour
versions: 25b3
Added file: http://bugs.jython.org/file688/continuation.py
_______________________________________
Jython tracker <report@...>
<http://bugs.jython.org/issue1365>
_______________________________________
|