Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
print()新しい関数でPython2.6を使用します。
print()
from __future__ import print_function
pydocでは、どうすればその関数のドキュメントを印刷できますか?シンプルな
pydoc
$ pydoc print
印刷機能の2.6バージョンに関するドキュメントを印刷します。
(言うまでもなく、ドキュメントはオンラインで見つけることができますが、コマンドラインでpydocを使用してアクセスできるようにしたいと思います。)
残念ながら近道はありません:
$ python -c 'from __future__ import print_function; help(print)'
これはおそらくあなたが望むものではありませんが、私のシステムではpydoc3.2 print、Python2.6とPython3.2の両方がインストールされているので実行できます...
pydoc3.2 print