@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version :Python 3.10\n "
1414"Report-Msgid-Bugs-To :\n "
15- "POT-Creation-Date :2025-04-25 16:05 +0000\n "
15+ "POT-Creation-Date :2025-05-02 16:07 +0000\n "
1616"PO-Revision-Date :2022-11-05 17:23+0000\n "
1717"Last-Translator :Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
1818"Language-Team :Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -3275,6 +3275,9 @@ msgid ""
32753275"and is written to (and read from) the file :file:`~/.python-history`. "
32763276"(Contributed by Antoine Pitrou and Éric Araujo in :issue:`5845`.)"
32773277msgstr ""
3278+ "在支持 :mod:`readline` 的系统上的交互模式中现在将默认启用 Tab 键补全。 历史记录也将默认启用,并会写入到 "
3279+ ":file:`~/.python-history` 文件(也会从中读取)。 (由 Antoine Pitrou 和 Éric Araujo 在 "
3280+ ":issue:`5845` 中贡献。)"
32783281
32793282#: ../../whatsnew/3.4.rst:1952
32803283msgid ""
@@ -3283,6 +3286,8 @@ msgid ""
32833286"changes were made to :mod:`argparse` (:issue:`18920`) and other modules that"
32843287" have script-like invocation capabilities (:issue:`18922`)."
32853288msgstr ""
3289+ "现在附带 ``--version`` 唤起 Python 解释器将会把版本信息输出到标准输出而不是标准错误 (:issue:`18338`)。 对于 "
3290+ ":mod:`argparse` (:issue:`18920`) 和其他具有脚本类唤起功能的模块也做了类似的修改 (:issue:`18922`)。"
32863291
32873292#: ../../whatsnew/3.4.rst:1957
32883293msgid ""
@@ -3415,6 +3420,10 @@ msgid ""
34153420"Set LINEAR_PROBES=0 to turn-off linear probing entirely. (Contributed by "
34163421"Raymond Hettinger in :issue:`18771`.)"
34173422msgstr ""
3423+ "针对集合的哈希碰撞的耗费现在已被降低。 每次哈希表检测现在会先检查一系列连续的、相邻的键/哈希值对再继续对整个哈希表执行随机检测。 "
3424+ "这将利用缓存本地化来使得碰撞求解付出较少代价。 这种碰撞求解方案可被描述为线性检测和开放寻址的结合。 额外的线性检测数默认为九次。 这可以在编译时通过将"
3425+ " LINEAR_PROBES 定义为任意值来修改。 设置 LINEAR_PROBES=0 可完全关闭线性检测。 (由 Raymond Hettinger"
3426+ " 在 :issue:`18771` 中贡献。)"
34183427
34193428#: ../../whatsnew/3.4.rst:2028
34203429msgid ""
@@ -3426,26 +3435,37 @@ msgid ""
34263435"Heimes and Victor Stinner in :issue:`19219`, :issue:`19218`, :issue:`19209`,"
34273436" :issue:`19205` and :issue:`9548`.)"
34283437msgstr ""
3438+ "解释器启动速度加快了约 30%。 多项措施促成了此次加速。 解释器在启动时加载的模块有所减少,例如 :mod:`re`, "
3439+ ":mod:`collections` 和 :mod:`locale` 模块及其依赖默认不再被导入。 marshal 模块得到改进以便更快速地加载已编译的"
3440+ " Python 代码。 (由 Antoine Pitrou, Christian Heimes 和 Victor Stinner 在 "
3441+ ":issue:`19219`, :issue:`19218`, :issue:`19209`, :issue:`19205` 和 "
3442+ ":issue:`9548` 中贡献。)"
34293443
34303444#: ../../whatsnew/3.4.rst:2036
34313445msgid ""
34323446":class:`bz2.BZ2File` is now as fast or faster than the Python2 version for "
34333447"most cases. :class:`lzma.LZMAFile` has also been optimized. (Contributed "
34343448"by Serhiy Storchaka and Nadeem Vawda in :issue:`16034`.)"
34353449msgstr ""
3450+ "现在 :class:`bz2.BZ2File` 在多数情况下相比 Python2 版本速度都一样快更快或。 :class:`lzma.LZMAFile`"
3451+ " 也获得了优化。 (由 Serhiy Storchaka 和 Nadeem Vawda 在 :issue:`16034` 中贡献。)"
34363452
34373453#: ../../whatsnew/3.4.rst:2040
34383454msgid ""
34393455":func:`random.getrandbits` is 20%-40% faster for small integers (the most "
34403456"common use case). (Contributed by Serhiy Storchaka in :issue:`16674`.)"
34413457msgstr ""
3458+ ":func:`random.getrandbits` 对于小整数(最常见的应用场景)可加速 20%-40%。 (由 Serhiy Storchaka 在"
3459+ " :issue:`16674` 中贡献。)"
34423460
34433461#: ../../whatsnew/3.4.rst:2043
34443462msgid ""
34453463"By taking advantage of the new storage format for strings, pickling of "
34463464"strings is now significantly faster. (Contributed by Victor Stinner and "
34473465"Antoine Pitrou in :issue:`15596`.)"
34483466msgstr ""
3467+ "得益于字符串的新存储格式,对字符串执行 pickle 操作现在将有明显加速。 (由 Victor Stinner 和 Antoine Pitrou 在 "
3468+ ":issue:`15596` 中贡献。)"
34493469
34503470#: ../../whatsnew/3.4.rst:2047
34513471msgid ""
@@ -3454,6 +3474,9 @@ msgid ""
34543474" significant amounts of data through :mod:`subprocess`. (Contributed by "
34553475"Richard Oudkerk in :issue:`15758`.)"
34563476msgstr ""
3477+ "一个 :meth:`io.FileIO.readall` 中的性能问题已被解决。 这对 Windows 有更具体的情况,将显著地提升通过 "
3478+ ":mod:`subprocess` 以管道方式传递大量数据这一应用场景下的速度。 (由 Richard Oudkerk 在 :issue:`15758`"
3479+ " 中贡献。)"
34573480
34583481#: ../../whatsnew/3.4.rst:2052
34593482msgid ""
@@ -3492,6 +3515,9 @@ msgid ""
34923515":exc:`DeprecationWarning` when the interpreter is run with deprecation "
34933516"warnings enabled (for example, by using ``-Wd``)."
34943517msgstr ""
3518+ "本小节列出了已在 Python 3.4 中弃用,并将在 Python 3.5 或之后的版本中移除的各种 API 和其他特性。 "
3519+ "在大多数(但并非全部)情况下,在解释器运行时设置了弃用警告时(例如通过使用 ``-Wd`` 选项)使用已弃用的 API 将产生 "
3520+ ":exc:`DeprecationWarning`。"
34953521
34963522#: ../../whatsnew/3.4.rst:2077
34973523msgid "Deprecations in the Python API"
@@ -3749,6 +3775,10 @@ msgid ""
37493775"objects that do not have a __format__ method that handles it. See "
37503776":issue:`7994` for background."
37513777msgstr ""
3778+ ":meth:`object.__format__` 不再接受非空格式字符串,它现在会改为引发 :exc:`TypeError`。 使用非空字符串自 "
3779+ "Python 3.2 起已被弃用。 做出此项改变是为了防止当对象获得 __format__ "
3780+ "方法时之前可用(但不正确)的代码执行失败的情况,这意味着现在当你对没有用于处理 ``'s'`` 的 __format__ "
3781+ "方法的对象使用该格式代码时你的代码可能会引发 :exc:`TypeError`。 请参阅 :issue:`7994` 了解相关背景。"
37523782
37533783#: ../../whatsnew/3.4.rst:2216
37543784msgid ""
@@ -3813,6 +3843,9 @@ msgid ""
38133843"how :envvar:`PATH` works. The behavior now conforms to the posix convention"
38143844" for :envvar:`PATH`."
38153845msgstr ""
3846+ "在 posix shell 中,将 :envvar:`PATH` 环境变量设为空值就等于完全不设置。 不过,将 :envvar:`PYTHONPATH`"
3847+ " 设为空值则 *不等于* 完全不设置:将 :envvar:`PYTHONPATH` 设为空值等于将其设为 ``.``,这在类 "
3848+ ":envvar:`PATH` 运作方式来进行理解时会导致困惑。 现在的行为将与 posix 中 :envvar:`PATH` 的惯例保持一致。"
38163849
38173850#: ../../whatsnew/3.4.rst:2257
38183851msgid ""
@@ -3821,13 +3854,17 @@ msgid ""
38213854"``-X showrefcount`` option. (Contributed by Ezio Melotti in "
38223855":issue:`17323`.)"
38233856msgstr ""
3857+ "现在 CPython 解释器的调试构建版 (``--with-pydebug``) 的 [X refs, Y blocks] 输出默认将关闭。 可以使用"
3858+ " ``-X showrefcount`` 选项来重新启用它。 (由 Ezio Melotti 在 :issue:`17323` 中贡献。)"
38243859
38253860#: ../../whatsnew/3.4.rst:2261
38263861msgid ""
38273862"The python command and most stdlib scripts (as well as :mod:`argparse`) now "
38283863"output ``--version`` information to ``stdout`` instead of ``stderr`` (for "
38293864"issue list see :ref:`other-improvements-3.4` above)."
38303865msgstr ""
3866+ "现在 python 命令和大多数标准库脚本(和 :mod:`argparse` 一样)会将 ``--version`` 信息输出到 ``stdout``"
3867+ " 而不是 ``stderr`` (相关问题列表参见上面的 :ref:`other-improvements-3.4`)。"
38313868
38323869#: ../../whatsnew/3.4.rst:2267
38333870msgid "Changes in the Python API"
@@ -3842,6 +3879,9 @@ msgid ""
38423879"compatibility, catch both :exc:`NotImplementedError` or the appropriate "
38433880"exception as needed."
38443881msgstr ""
3882+ "在 :mod:`importlib.abc` 中定义的 ABC 现在将会引发适当的异常或是返回默认值而不是无脑引发 "
3883+ ":exc:`NotImplementedError`。 这将只影响调用 :func:`super` 并一路下落到这些 ABC 的代码。 "
3884+ "为保持兼容性,:exc:`NotImplementedError` 和所需的相应异常都要被捕获。"
38453885
38463886#: ../../whatsnew/3.4.rst:2275
38473887msgid ""
@@ -3866,6 +3906,9 @@ msgid ""
38663906"reloading. Note that this restores a pre-3.3 behavior in that it means a "
38673907"module is re-found when re-loaded (:issue:`19413`)."
38683908msgstr ""
3909+ "当重载时 import 操作现在会无条件地重置相关属性 (例如 ``__name__``, ``__loader__``, "
3910+ "``__package__``, ``__file__``, ``__cached__``)。 请注意在模块重载时会被重发现这一点上该操作恢复了 3.3"
3911+ " 之前的行为 (:issue:`19413`)。"
38693912
38703913#: ../../whatsnew/3.4.rst:2290
38713914msgid ""
@@ -3876,6 +3919,9 @@ msgid ""
38763919"to determine if a module is a package or not is to use ``hasattr(module, "
38773920"'__path__')`` (:issue:`18065`)."
38783921msgstr ""
3922+ "冻结的包将不再把 ``__path__`` 设为一个包含包名的列表,它们现在会把它设为一个空列表。 "
3923+ "当存在与冻结的包同名的目录时之前版本的行为可能会使导入系统错误地处理子模块。 确定一个模块是否属于包的正确方式是使用 ``hasattr(module,"
3924+ " '__path__')`` (:issue:`18065`)。"
38793925
38803926#: ../../whatsnew/3.4.rst:2297
38813927msgid ""
@@ -3895,6 +3941,8 @@ msgid ""
38953941" a warning that import will overwrite those files with a regular file "
38963942"regardless of what type of file path they were originally."
38973943msgstr ""
3944+ "现在 :func:`py_compile.compile` 在它要写入的文件路径是符号链接或非常规文件时会引发 "
3945+ ":exc:`FileExistsError`。 这是为了提示导入系统将用一个常规文件覆盖相应文件而不管原始文件路径是什么类型而发出的警告。"
38983946
38993947#: ../../whatsnew/3.4.rst:2310
39003948msgid ""
@@ -3907,6 +3955,10 @@ msgid ""
39073955"before and wish to continue to ignore syntax or decoding issues, catch all "
39083956"three exceptions now."
39093957msgstr ""
3958+ "当被加载的源代码触发了 :exc:`SyntaxError` 或 :exc:`UnicodeDecodeError` 时 "
3959+ ":meth:`importlib.abc.SourceLoader.get_source` 将不再引发 :exc:`ImportError`。 因为 "
3960+ ":exc:`ImportError` 本意只是在应该找到源代码但却找不到时被引发,而在源代码已找到但结构不正确时使用此异常会感觉有些过度/过载。 "
3961+ "如果你在之前是捕获 ImportError 并希望继续忽略语法或解码问题,现在应当捕获所有这三个异常。"
39103962
39113963#: ../../whatsnew/3.4.rst:2319
39123964msgid ""
@@ -3919,6 +3971,10 @@ msgid ""
39193971"behaviour was intentional can use :func:`inspect.unwrap` to access the first"
39203972" function in the chain that has no ``__wrapped__`` attribute."
39213973msgstr ""
3974+ "现在 :func:`functools.update_wrapper` 和 :func:`functools.wraps` 会正确地将 "
3975+ "``__wrapped__`` 属性设为被包装的函数,即使该函数同样设置了 ``__wrapped__`` 属性。 这意味着 "
3976+ "``__wrapped__`` 属性现在会正确地链接由被装饰函数组成的栈而不是链中指向最内层函数的的每个 ``__wrapped__`` 属性。 "
3977+ "确定要沿袭之前版本行为的内省库可以使用 :func:`inspect.unwrap` 来访问链中没有 ``__wrapped__`` 属性的第一个函数。"
39223978
39233979#: ../../whatsnew/3.4.rst:2329
39243980msgid ""
@@ -4114,6 +4170,9 @@ msgid ""
41144170"deprecated. This key should be replaced by ``EXT_SUFFIX`` or "
41154171"``SHLIB_SUFFIX``, depending on the context (:issue:`19555`)."
41164172msgstr ""
4173+ "附带 ``SO`` 键调用 :func:`sysconfig.get_config_var`,或者在对 "
4174+ ":func:`sysconfig.get_config_vars` 的调用结果中查找 ``SO`` 的做法已被弃用。 该键应当被 "
4175+ "``EXT_SUFFIX`` 或 ``SHLIB_SUFFIX`` 替代,由具体场景决定 (:issue:`19555`)。"
41174176
41184177#: ../../whatsnew/3.4.rst:2455
41194178msgid ""
@@ -4124,12 +4183,16 @@ msgid ""
41244183" stream in :mod:`~io.TextIOWrapper` to use its *newline* argument "
41254184"(:issue:`15204`)."
41264185msgstr ""
4186+ "任何指定了 ``U`` 的 ``open`` 函数调用都应当被修改。 ``U`` 在 Python3 将没有效果并且最终会在被使用时引发错误。 "
4187+ "对于该函数,要得到与它的旧 Python2 行为相同的效果可以使用 *newline* 参数,或者在必要时将流包装在 "
4188+ ":mod:`~io.TextIOWrapper` 以使用其 *newline* 参数 (:issue:`15204`)。"
41274189
41284190#: ../../whatsnew/3.4.rst:2462
41294191msgid ""
41304192"If you use ``pyvenv`` in a script and desire that pip *not* be installed, "
41314193"you must add ``--without-pip`` to your command invocation."
41324194msgstr ""
4195+ "如果你在脚本中使用 ``pyvenv`` 并且希望 *不要* 安装 pip,你必须在你的唤起命令中添加 ``--without-pip``。"
41334196
41344197#: ../../whatsnew/3.4.rst:2466
41354198msgid ""
@@ -4139,6 +4202,9 @@ msgid ""
41394202"you have tests that are doing white-space-sensitive comparisons of such "
41404203"output (:issue:`16333`)."
41414204msgstr ""
4205+ ":func:`json.dump` 和 :func:`json.dumps` "
4206+ "在指定了缩进值时的默认行为已被改变:它不会在行末的条目分隔逗号后面再附加空格。 此项改变仅在你使用了对这样的输出执行空格敏感比较的测试时才会有影响 "
4207+ "(:issue:`16333`)。"
41424208
41434209#: ../../whatsnew/3.4.rst:2472
41444210msgid ""
@@ -4181,6 +4247,11 @@ msgid ""
41814247"when invoking these operations (directly or indirectly) and running against "
41824248"a version of Python that is compiled with assertions enabled."
41834249msgstr ""
4250+ "现在 :c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr` 和 "
4251+ ":c:func:`PyObject_Str` 以及其他一些内部 C API "
4252+ "都包括了一个调试断言,以确保它们不会在可能会静默地丢弃当前活动异常的情况下使用。 在预期并且希望丢弃活动异常的情况下(例如,由于已通过 "
4253+ ":c:func:`PyErr_Fetch` 将其保存在本地或是有意将其替换为不同的异常 ),则需调用显式的 :c:func:`PyErr_Clear` "
4254+ "以避免在(直接或间接)唤起这些操作和针对启用断言编译的 Python 的版本运行时触发断言。"
41844255
41854256#: ../../whatsnew/3.4.rst:2500
41864257msgid ""