@@ -2619,6 +2619,14 @@ msgid ""
26192619"from :mod:`sys` (or setting it to some other callable). (Contributed by "
26202620"Éric Araujo and Antoine Pitrou in :issue:`5845`.)"
26212621msgstr ""
2622+ "当 Python 解释器以 :ref:`交互模式 <tut-interactive>` 启动时,它会检查 :mod:`sys` 模块中的 "
2623+ ":data:`~sys.__interactivehook__` 属性。 如果该属性存在,它的值将在交互模式启动之前不附带参数地被调用。 "
2624+ "这个检查是在读取 :envvar:`PYTHONSTARTUP` 文件之后进行的,因此可以在那里设置它。 :mod:`site` 模块会在平台支持 "
2625+ ":mod:`readline` 的情况下 :ref:`把它设置为 <rlcompleter-config>` 一个启用制表符补全和历史记录保存(在 "
2626+ ":file:`~/.python-history` 中)的函数。 如果你不想要这个(新增的)行为,可以通过从 :mod:`sys` "
2627+ "中删除这个属性(或将其设为其他可调用对象)在 :envvar:`PYTHONSTARTUP`, :mod:`sitecustomize` 或 "
2628+ ":mod:`usercustomize` 中覆盖它。 (由 Éric Araujo 和 Antoine Pitrou 在 :issue:`5845` "
2629+ "中贡献。)"
26222630
26232631#: ../../whatsnew/3.4.rst:1573
26242632msgid "tarfile"
@@ -2631,6 +2639,8 @@ msgid ""
26312639"and extract tarfile archives. (Contributed by Berker Peksag in "
26322640":issue:`13477`.)"
26332641msgstr ""
2642+ "现在 :mod:`tarfile` 模块当直接作为脚本或通过 ``-m`` 调用时将支持简单的 :ref:`tarfile-commandline`。 "
2643+ "这可被用来创建和提取 tar 归档文件。 (由 Berker Peksag 在 :issue:`13477` 中贡献。)"
26342644
26352645#: ../../whatsnew/3.4.rst:1581
26362646msgid "textwrap"
@@ -2649,6 +2659,12 @@ msgid ""
26492659"(Contributed by Antoine Pitrou and Serhiy Storchaka in :issue:`18585` and "
26502660":issue:`18725`.)"
26512661msgstr ""
2662+ ":class:`~textwrap.TextWrapper` 类新增了两个属性/构造器参数: "
2663+ ":attr:`~textwrap.TextWrapper.max_lines`,用来限制输出的行数,以及 "
2664+ ":attr:`~textwrap.TextWrapper.placeholder`,它是一个当输出由于 *max_lines* "
2665+ "限制被截断时将出现在输出末尾处的字符串。 一个在此功能之上新增的便捷函数 :func:`~textwrap.shorten` "
2666+ "可将输入中的所有空格压缩为单个空格并产生一个宽度为 *width* 并以 *placeholder* (默认为 ``[...]``) 结束的单独行。 "
2667+ "(由 Antoine Pitrou 和 Serhiy Storchaka 在 :issue:`18585` 和 :issue:`18725` 中贡献。)"
26522668
26532669#: ../../whatsnew/3.4.rst:1595
26542670msgid "threading"
@@ -2661,6 +2677,9 @@ msgid ""
26612677"conditions this will be the thread from which the Python interpreter was "
26622678"started. (Contributed by Andrew Svetlov in :issue:`18882`.)"
26632679msgstr ""
2680+ "代表可通过新增的 :func:`~threading.main_thread` 函数来获取的主线程的 "
2681+ ":class:`~threading.Thread` 对象。 在通常条件下这将是启动 Python 解释器所在的线程。 (由 Andrew "
2682+ "Svetlov 在 :issue:`18882` 中贡献。)"
26642683
26652684#: ../../whatsnew/3.4.rst:1604
26662685msgid "traceback"
0 commit comments