<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](floatingpoint.xhtml "15. 浮點算術:爭議和限制") | - [上一頁](whatnow.xhtml "13. 接下來?") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 教程](index.xhtml) ? - $('.inline-search').show(0); | # 14. 交互式編輯和編輯歷史 某些版本的 Python 解釋器支持編輯當前輸入行和編輯歷史記錄,類似 Korn shell 和 GNU Bash shell 的功能 。這個功能使用了 [GNU Readline](https://tiswww.case.edu/php/chet/readline/rltop.html) \[https://tiswww.case.edu/php/chet/readline/rltop.html\] 來實現,一個支持多種編輯方式的庫。這個庫有它自己的文檔,在這里我們就不重復說明了。 ## 14.1. Tab 補全和編輯歷史 在解釋器啟動的時候,補全變量和模塊名的功能將 [自動打開](../library/site.xhtml#rlcompleter-config),以便在按下 Tab 鍵的時候調用補全函數。它會查看 Python 語句名稱,當前局部變量和可用的模塊名稱。處理像 `string.a` 的表達式,它會求值在最后一個 `'.'` 之前的表達式,接著根據求值結果對象的屬性給出補全建議。如果擁有 [`__getattr__()`](../reference/datamodel.xhtml#object.__getattr__ "object.__getattr__") 方法的對象是表達式的一部分,注意這可能會執行程序定義的代碼。默認配置下會把編輯歷史記錄保存在用戶目錄下名為 `.python_history` 的文件。在下一次 Python 解釋器會話期間,編輯歷史記錄仍舊可用。 ## 14.2. 默認交互式解釋器的替代品 Python 解釋器與早期版本的相比,向前邁進了一大步;無論怎樣,還有些希望的功能:如果能在編輯連續行時建議縮進(解析器知道接下來是否需要縮進符號),那將很棒。補全機制可以使用解釋器的符號表。有命令去檢查(甚至建議)括號,引號以及其他符號是否匹配。 一個可選的增強型交互式解釋器是 [IPython](https://ipython.org/) \[https://ipython.org/\],它已經存在了有一段時間,它具有 tab 補全,探索對象和高級歷史記錄管理功能。它還可以徹底定制并嵌入到其他應用程序中。另一個相似的增強型交互式環境是 [bpython](https://www.bpython-interpreter.org/) \[https://www.bpython-interpreter.org/\]。 ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](floatingpoint.xhtml "15. 浮點算術:爭議和限制") | - [上一頁](whatnow.xhtml "13. 接下來?") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 教程](index.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>

                              哎呀哎呀视频在线观看