Issue222805

classification
Title: multi-line statements in the JPython interpreter
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pedronis Nosy List: bckfnn, herron, pedronis
Priority: low Keywords:

Created on 2000-11-18.19:04:04 by bckfnn, last changed 2001-12-07.22:27:03 by herron.

Messages
msg47 (view) Author: Finn Bock (bckfnn) Date: 2000-11-18.19:04:04
The following kinds of multi-line statements work if written in
an imported module:

s = (
'Hello, world.'
)

s = \
'Hello, world.'

i = (
3+ 4
}

i = \
3 + 4

All of them fail in the JPython interpreter as soon as the first line is typed
in.

Is multi-line functionality supposed to be supported in the interactive
interpreter?

JPython 1.1beta2 on java1.2.1
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>>
>>> s = (
Traceback (innermost last):
  (no code object) at line 0
  File "<console>", line 1
SyntaxError: invalid syntax
>>> s = \
Traceback (innermost last):
  (no code object) at line 0
  File "<console>", line 1
SyntaxError: invalid syntax
>>>
msg48 (view) Author: Finn Bock (bckfnn) Date: 2000-11-26.13:15:44
Should be fixed, but the grammar is tricky. Also look at bug 122813 which have another situation where the problem occurs.
msg49 (view) Author: Gary Herron (herron) Date: 2001-12-07.22:27:03
Logged In: YES 
user_id=395736

Multiline strings also fail in the Jython interpreter with a
similar error message.

Jython 2.1b1 on java1.3.1_01 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> a='''asd
Traceback (innermost last):
  (no code object) at line 0
  File "<console>", line 2
SyntaxError: Lexical error at line 2, column 0.  Encountered: 
<EOF> after : ""
>>>

History
Date User Action Args
2000-11-18 19:04:04bckfnncreate