<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](binary.xhtml "二進制數據服務") | - [上一頁](readline.xhtml "readline --- GNU readline interface") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [文本處理服務](text.xhtml) ? - $('.inline-search').show(0); | # [`rlcompleter`](#module-rlcompleter "rlcompleter: Python identifier completion, suitable for the GNU readline library.") --- GNU readline的完成函數 **源代碼:** [Lib/rlcompleter.py](https://github.com/python/cpython/tree/3.7/Lib/rlcompleter.py) \[https://github.com/python/cpython/tree/3.7/Lib/rlcompleter.py\] - - - - - - `rlcompeleter` 通過補全有效的 Python 標識符和關鍵字為 [`readline`](readline.xhtml#module-readline "readline: GNU readline support for Python. (Unix)") 模塊定義了一個補全功能套裝. 當此模塊在具有可用的 [`readline`](readline.xhtml#module-readline "readline: GNU readline support for Python. (Unix)") 模塊的 Unix 平臺被導入, 一個 `Completer` 實例將被自動創建并且它的 `complete()` 方法將設置為 [`readline`](readline.xhtml#module-readline "readline: GNU readline support for Python. (Unix)") 的補全器. 示例: ``` >>> import rlcompleter >>> import readline >>> readline.parse_and_bind("tab: complete") >>> readline. <TAB PRESSED> readline.__doc__ readline.get_line_buffer( readline.read_init_file( readline.__file__ readline.insert_text( readline.set_completer( readline.__name__ readline.parse_and_bind( >>> readline. ``` [`rlcompleter`](#module-rlcompleter "rlcompleter: Python identifier completion, suitable for the GNU readline library.") 模塊是為了使用 Python 的 [交互模式](../tutorial/interpreter.xhtml#tut-interactive) 而設計的. 除非 Python 是通過 [`-S`](../using/cmdline.xhtml#id3) 選項運行, 這個模塊總是自動地被導入且配置(參考 [Readline configuration](site.xhtml#rlcompleter-config)). 在沒有 [`readline`](readline.xhtml#module-readline "readline: GNU readline support for Python. (Unix)") 的平臺, 此模塊定義的 `Completer` 類仍然可以用于自定義行為. ## Completer對象 Completer對象具有以下方法: `Completer.``complete`(*text*, *state*)為 *text* 返回 *state*th 補全. 如果要求 *text* 不包含句點字符 (`'.'`), 它將從當前定義的名稱中完成 [`__main__`](__main__.xhtml#module-__main__ "__main__: The environment where the top-level script is run."), [`builtins`](builtins.xhtml#module-builtins "builtins: The module that provides the built-in namespace.") 和 keywords (就和通過 [`keyword`](keyword.xhtml#module-keyword "keyword: Test whether a string is a keyword in Python.") 模塊定義的一樣). 如果為加點的名稱執行調用,它將嘗試盡量求值直到最后一部分為止而不產生附帶影響(函數不會被求值,但它可以生成對 [`__getattr__()`](../reference/datamodel.xhtml#object.__getattr__ "object.__getattr__") 的調用),并通過 [`dir()`](functions.xhtml#dir "dir") 函數來匹配剩余部分。 在對表達式求值期間引發的任何異常都會被捕獲、靜默處理并返回 [`None`](constants.xhtml#None "None")。 ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](binary.xhtml "二進制數據服務") | - [上一頁](readline.xhtml "readline --- GNU readline interface") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [文本處理服務](text.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看