ホームページ バックエンド開発 Python チュートリアル Python の組み込みヘルプ機能の詳細な紹介

Python の組み込みヘルプ機能の詳細な紹介

Mar 21, 2017 am 10:49 AM

英語ドキュメント:

ヘルプ([オブジェクト]) help([object])

Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.

This function is added to the built-in namespace by the site

組み込みのヘルプ システムを呼び出します (この関数は対話型での使用を目的としています)。引数が指定されていない場合、対話型ヘルプ システムは、引数が文字列の場合、モジュール、関数、クラス、メソッド、キーワード、またはドキュメント トピックの名前として検索され、コンソールにヘルプ ページが表示されます。引数が他の種類のオブジェクトの場合、そのオブジェクトに関するヘルプ ページが生成されます。

この関数は、site module.<p></p> <p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"></span>指示: </p> <p></p> 1. インタプリタの対話型インターフェイスで、パラメータを渡さずに関数を呼び出すと、組み込みのヘルプ システムがアクティブになり、ヘルプ システムに入ります。ヘルプ システム内のモジュール、クラス、関数などの名前を入力すると、「quit」と入力して組み込みのヘルプ システムを終了し、対話型インターフェイスに戻ります。 🎜<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class='brush:php;toolbar:false;'>&gt;&gt;&gt; help() #不带参数 Welcome to Python 3.5&amp;#39;s help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/3.5/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type &quot;quit&quot;. To get a list of available modules, keywords, symbols, or topics, type &quot;modules&quot;, &quot;keywords&quot;, &quot;symbols&quot;, or &quot;topics&quot;. Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as &quot;spam&quot;, type &quot;modules spam&quot;. #进入内置帮助系统 &gt;&gt;&gt; 变成了 help&gt; help&gt; str #str的帮助信息 Help on class str in module builtins: class str(object) | str(object=&amp;#39;&amp;#39;) -&gt; str | str(bytes_or_buffer[, encoding[, errors]]) -&gt; str | | Create a new string object from the given object. If encoding or | errors is specified, then the object must expose a data buffer | that will be decoded using the given encoding and error handler. | Otherwise, returns the result of object.__str__() (if defined) | or repr(object). | encoding defaults to sys.getdefaultencoding(). | errors defaults to &amp;#39;strict&amp;#39;. | | Methods defined here: | | __add__(self, value, /) | Return self+value. ................................ help&gt; 1 #不存在的模块名、类名、函数名 No Python documentation found for &amp;#39;1&amp;#39;. Use help() to get the interactive help utility. Use help(str) for help on the str class. help&gt; quit #退出内置帮助系统 You are now leaving help and returning to the Python interpreter. If you want to ask for help on a particular object directly from the interpreter, you can type &quot;help(object)&quot;. Executing &quot;help(&amp;#39;string&amp;#39;)&quot; has the same effect as typing a particular string at the help&gt; prompt. # 已退出内置帮助系统,返回交互界面 help&gt; 变成 &gt;&gt;&gt; &gt;&gt;&gt;</pre><div class="contentsignin">ログイン後にコピー</div></div>🎜🎜2. インタプリタ対話型インターフェースでは、関数を呼び出すためにパラメータを渡すときに、パラメータがモジュール名、クラス名、関数名であるかどうかを確認し、そうである場合は、その使用方法が表示されます。 🎜🎜りー🎜🎜

以上がPython の組み込みヘルプ機能の詳細な紹介の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

LinuxターミナルでPythonバージョンを表示するときに発生する権限の問題を解決する方法は? LinuxターミナルでPythonバージョンを表示するときに発生する権限の問題を解決する方法は? Apr 01, 2025 pm 05:09 PM

LinuxターミナルでPythonバージョンを表示する際の許可の問題の解決策PythonターミナルでPythonバージョンを表示しようとするとき、Pythonを入力してください...

プロジェクトの基本と問題駆動型の方法で10時間以内にコンピューター初心者プログラミングの基本を教える方法は? プロジェクトの基本と問題駆動型の方法で10時間以内にコンピューター初心者プログラミングの基本を教える方法は? Apr 02, 2025 am 07:18 AM

10時間以内にコンピューター初心者プログラミングの基本を教える方法は?コンピューター初心者にプログラミングの知識を教えるのに10時間しかない場合、何を教えることを選びますか...

あるデータフレームの列全体を、Python内の異なる構造を持つ別のデータフレームに効率的にコピーする方法は? あるデータフレームの列全体を、Python内の異なる構造を持つ別のデータフレームに効率的にコピーする方法は? Apr 01, 2025 pm 11:15 PM

PythonのPandasライブラリを使用する場合、異なる構造を持つ2つのデータフレーム間で列全体をコピーする方法は一般的な問題です。 2つのデータがあるとします...

中間の読書にどこでもfiddlerを使用するときにブラウザによって検出されないようにするにはどうすればよいですか? 中間の読書にどこでもfiddlerを使用するときにブラウザによって検出されないようにするにはどうすればよいですか? Apr 02, 2025 am 07:15 AM

fiddlereveryversings for the-middleの測定値を使用するときに検出されないようにする方法

uvicornは、serving_forever()なしでhttpリクエストをどのように継続的に聞いていますか? uvicornは、serving_forever()なしでhttpリクエストをどのように継続的に聞いていますか? Apr 01, 2025 pm 10:51 PM

UvicornはどのようにしてHTTPリクエストを継続的に聞きますか? Uvicornは、ASGIに基づく軽量のWebサーバーです。そのコア機能の1つは、HTTPリクエストを聞いて続行することです...

文字列を介してオブジェクトを動的に作成し、Pythonでメソッドを呼び出す方法は? 文字列を介してオブジェクトを動的に作成し、Pythonでメソッドを呼び出す方法は? Apr 01, 2025 pm 11:18 PM

Pythonでは、文字列を介してオブジェクトを動的に作成し、そのメソッドを呼び出す方法は?これは一般的なプログラミング要件です。特に構成または実行する必要がある場合は...

See all articles