Skip to content Skip to sidebar Skip to footer

Function Object In Spyder Not Working Properly

When I am building a function in python, using spyder, the function object is not working properly. e.g., def first_order(y,t): tau=5 After introducing the 2nd line it autom

Solution 1:

Spyder uses IPython in its interactive console. What you report is a bug in IPython 7.0, so the cleanest solution is to upgrade to IPython 7.1.

As a stop gap measure, if your platform doesn't provide 7.1 yet, you can use the key-chord Ctrl-o (instead of Return) to open a new line below the second line of the function definition and move there using the cursor key — after this maneuver the situation will be normal for the rest of the function definition.

Update

I knew that Spyder uses IPython, I didn't knew that it uses it via the qtconsole and the bug I described was still not fixed in 7.1 qtconsole (thank you Carlos Cordoba for pointing out).

The reason why OP has a problem still stands as valid, I fear that we have to wait 7.2 to have a fix for the qtconsole because the ad interim solution that I've described doesn't work in qtconsole

Solution 2:

(Spyder maintainer here) This is a bug in the Qtconsole package and it'll be fixed in its 4.4.3 version, to be released today.

Post a Comment for "Function Object In Spyder Not Working Properly"