7

I have been investigating jython a bit, and at the jython terminal accidentally typed 1 = 2 instead of q = 2, and found this:

>>> 1 = 2
...
...

I had to Ctrl+C to get out of it. No other input seems to make it happy.

I put the same code in a script and ran it with the same behavior (it just hangs).

In CPython, I get a SyntaxError: can't assign to literal (as expected).

Any idea what's going on? Is this just a jython bug?

$ jython
Jython 2.5.2 (Debian:hg/91332231a448, Jun 3 2012, 09:02:34) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_51
Charles
  • 50,943
  • 13
  • 104
  • 142
Seth
  • 45,033
  • 10
  • 85
  • 120
  • 2
    This is almost certainly a bug with Jython. (Incidentally, typing `\X` for any `X` on the next line ends the statement and triggers the correct error.) – nneonneo Apr 04 '14 at 23:04
  • I'd report the bug at the Jython bug tracker: http://bugs.jython.org/ – nneonneo Apr 04 '14 at 23:05

0 Answers0