
2.2
IPython
の基礎
23
図2-4 関数のキーワード引数に対するタブ補完
関数については後ほど触れていきたいと思います。
2.2.4
イントロスペクション
変数の前、もしくは後に疑問符(
?
)を付けると、そのオブジェクトの一般情報を見ることができます。
In [8]: b = [1, 2, 3]
In [9]: b?
Type: list
String Form:[1, 2, 3]
Length: 3
Docstring:
list() -> new empty list
list(iterable) -> new list initialized from iterable's items
In [10]: print?
Docstring:
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a st
ream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline. ...