Comment 4 for bug 290981

Revision history for this message
Stephan Peijnik (speijnik) wrote :

I know it's been a while, but I again tested against this bug and I'm not sure it's really readline-related.

Without doing a check on this I expect that ipython, and not readline, executes the python code entered. If that's the case it sure looks like ipython causing the problem, and not readline.

This is the result of another test of mine:

--begin test--

In [1]: def a(b):
   ...: q=5
   ...: return q
------------------------------------------------------------
IndentationError: unindent does not match any outer indentation level (<ipython console>, line 3)

In [2]: def a(b):
    q=5
   return q
---------------------------------------------------------------------------
NameError Traceback (most recent call last)

/home/sp/<ipython console> in <module>()

NameError: name 'q' is not defined

In [3]: def a(b):
    q=5
   return q
------------------------------------------------------------
IndentationError: unindent does not match any outer indentation level (<ipython console>, line 3)

In [6]: def a(b):
    q=5
   return q
---------------------------------------------------------------------------
NameError Traceback (most recent call last)

/home/sp/<ipython console> in <module>()

NameError: name 'q' is not defined
--end test--

Note how every command with an odd line number works correctly and how ones with an even line number do not work.
Also, I did copy&paste the complete sets of commands I entered, why does the fourth input end up at "In [6]"?

So again, I am suspecting an ipython-internal issue, rather than a readline one. Could someone please try to reproduce this?

-- Stephan