簡體   English   中英

iPython不會讓我結束定義函數

[英]iPython won't let me finish defining a function

我想定義一個包含多行的函數。 但是ipython似乎正在考慮盡快完成一個功能。

$ ipython
In [1]: def whatever():
   ...:     a = 1

In [2]:

我如何使ipython像以前一樣工作,

$ ipython
In [1]: def whatever():
   ...:     a = 1
   ...:     print(a)
   ...:

In [2]:

我正在使用Python 3.6,iPython --version 7.0.1和Ubuntu 16.04

@ daniel-roseman是正確的,我只需要從iPython版本7.0.1升級到7.1.1。 對我來說,運行命令

pipenv --update ipython

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM