I'm using IPython in zsh shell and I'm having a trouble defining a function with multiple lines.
For example, in the original Python shell, I can define a function f like this:
>>> def f(x):
... a = x + 1
... return a
...
>>>
When I did it in IPython, the defination ends immediately when The line 'a = x + 1' ends. It looks like this:
In [4]: def f(x):
...: a = x + 1
In [5]:
How can I fix it by changing some configuration or installing another version of IPython?
My version of Python and IPython:
Python 3.5.6 |Anaconda, Inc.|
Type 'copyright', 'credits' or 'license' for more information
IPython 7.0.1 -- An enhanced Interactive Python. Type '?' for help.