# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-07-25 16:03+0000\n" "PO-Revision-Date: 2025-07-18 19:59+0000\n" "Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../tutorial/interactive.rst:5 msgid "Interactive Input Editing and History Substitution" msgstr "交互式编辑和编辑历史" #: ../../tutorial/interactive.rst:7 msgid "" "Some versions of the Python interpreter support editing of the current input" " line and history substitution, similar to facilities found in the Korn " "shell and the GNU Bash shell. This is implemented using the `GNU Readline`_" " library, which supports various styles of editing. This library has its " "own documentation which we won't duplicate here." msgstr "" "某些版本的 Python 解释器支持编辑当前输入行和编辑历史记录,类似 Korn shell 和 GNU Bash shell 的功能 。这个功能使用了" " `GNU Readline`_ 来实现,一个支持多种编辑方式的库。这个库有它自己的文档,在这里我们就不重复说明了。" #: ../../tutorial/interactive.rst:17 msgid "Tab Completion and History Editing" msgstr "Tab 补全和编辑历史" #: ../../tutorial/interactive.rst:19 msgid "" "Completion of variable and module names is :ref:`automatically enabled " "` at interpreter startup so that the :kbd:`Tab` key " "invokes the completion function; it looks at Python statement names, the " "current local variables, and the available module names. For dotted " "expressions such as ``string.a``, it will evaluate the expression up to the " "final ``'.'`` and then suggest completions from the attributes of the " "resulting object. Note that this may execute application-defined code if an" " object with a :meth:`~object.__getattr__` method is part of the expression." " The default configuration also saves your history into a file named " ":file:`.python_history` in your user directory. The history will be " "available again during the next interactive interpreter session." msgstr "" "在解释器启动的时候变量和模块名补全功能将 :ref:`自动启用 ` 以便在按下 :kbd:`Tab` " "键时唤起补全函数;它会查找 Python 语句名称、当前局部变量和可用的模块名称。 对于带点号的表达式如 " "``string.a``,它会对该表达式最后一个 ``'.'`` 之前的部分求值然后根据结果对象的属性给出补全建议。 请注意如果具有 " ":meth:`~object.__getattr__` 方法的对象是该表达式的一部分这可能会执行应用程序定义的代码。 " "默认配置还会将你的编辑历史保存到你的用户目录下名为 :file:`.python_history` 的文件。 " "该历史在下一次交互式解释器会话期间将继续可用。" #: ../../tutorial/interactive.rst:36 msgid "Alternatives to the Interactive Interpreter" msgstr "默认交互式解释器的替代品" #: ../../tutorial/interactive.rst:38 msgid "" "This facility is an enormous step forward compared to earlier versions of " "the interpreter; however, some wishes are left: It would be nice if the " "proper indentation were suggested on continuation lines (the parser knows if" " an :data:`~token.INDENT` token is required next). The completion mechanism" " might use the interpreter's symbol table. A command to check (or even " "suggest) matching parentheses, quotes, etc., would also be useful." msgstr "" "此功能相比较早版本的解释器是很大的进步;不过,还有一些需求没有实现:如果能为连续行提示正确的缩进就更好了(解析器知道接下来是否需要 " ":data:`~token.INDENT` 词元)。 补全机制或许可以使用解释器的符号表。 使用一个命令来检查(甚至提示)匹配括号、引号等也会很有帮助。" #: ../../tutorial/interactive.rst:45 msgid "" "One alternative enhanced interactive interpreter that has been around for " "quite some time is IPython_, which features tab completion, object " "exploration and advanced history management. It can also be thoroughly " "customized and embedded into other applications. Another similar enhanced " "interactive environment is bpython_." msgstr "" "一个可选的增强型交互式解释器是 IPython_,它已经存在了有一段时间,它具有 tab " "补全,探索对象和高级历史记录管理功能。它还可以彻底定制并嵌入到其他应用程序中。另一个相似的增强型交互式环境是 bpython_。"