# 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: # python-doc bot, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-01-03 16:02+0000\n" "PO-Revision-Date: 2025-09-22 15:58+0000\n" "Last-Translator: python-doc bot, 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:`__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:`__getattr__` " "方法的对象是表达式的一部分,注意这可能会执行程序定义的代码。默认配置下会把编辑历史记录保存在用户目录下名为 " ":file:`.python_history` 的文件。在下一次 Python 解释器会话期间,编辑历史记录仍旧可用。" #: ../../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 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 "" "Python " "解释器与早期版本的相比,向前迈进了一大步;无论怎样,还有些希望的功能:如果能在编辑连续行时建议缩进(解析器知道接下来是否需要缩进符号),那将很棒。补全机制可以使用解释器的符号表。有命令去检查(甚至建议)括号,引号以及其他符号是否匹配。" #: ../../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_。"