2015-09-04 29 views
0

考慮與IPython3如下:讓IPython3表現得像Python3爲`type`

Python 3.4.3+ (default, Jul 28 2015, 13:17:50) 
Type "copyright", "credits" or "license" for more information. 

IPython 4.0.0 -- An enhanced Interactive Python. 
?   -> Introduction and overview of IPython's features. 
%quickref -> Quick reference. 
help  -> Python's own help system. 
object? -> Details about 'object', use 'object??' for extra details. 

In [1]: type([1,2]) 
Out[1]: list 

和同一段代碼與Python3:

Python 3.4.3+ (default, Jul 28 2015, 13:17:50) 
[GCC 4.9.3] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> type([1,2]) 
<class 'list'> 

我如何可以調整IPython的,這樣就說明與「純」Python3相同的輸出?

回答

0

人們需要停用漂亮的印刷:

%pprint