1

docstring を表示しているときに自動的に印刷を行うように構成ファイルを変更できますか?

以下の iPython コンソールで 6 と 7 を比較してください。

In [6]: zip.__doc__
Out[6]: 'zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]\n\nReturn a list of tuples, where each tuple contains the i-th element\nfrom each of the argument sequences.  The returned list is truncated\nin length to the length of the shortest argument sequence.'

In [7]: print zip.__doc__
zip(seq1 [, seq2 [...]]) -> [(seq1[0], seq2[0] ...), (...)]

Return a list of tuples, where each tuple contains the i-th element
from each of the argument sequences.  The returned list is truncated
in length to the length of the shortest argument sequence.

ありがとう。

4

1 に答える 1