@@ -3651,6 +3651,9 @@ msgid ""
3651
3651
"the position of the reference. (Contributed by SilentGhost, Serhiy Storchaka"
3652
3652
" in :issue:`25953`.)"
3653
3653
msgstr ""
3654
+ "现在 :func:`re.sub` 即使未在字符串中找到模式也会针对替换模板中无效的数字分组引用引发错误。 "
3655
+ "针对无效分组引用的错误消息现在将包括分组索引和引用位置。 (由 SilentGhost, Serhiy Storchaka 在 "
3656
+ ":issue:`25953` 中贡献。)"
3654
3657
3655
3658
#: ../../whatsnew/3.6.rst:2305
3656
3659
msgid ""
@@ -3661,6 +3664,11 @@ msgid ""
3661
3664
"ZipFile created with mode ``'r'`` will raise a :exc:`ValueError`. "
3662
3665
"Previously, a :exc:`RuntimeError` was raised in those scenarios."
3663
3666
msgstr ""
3667
+ "现在 :class:`zipfile.ZipFile` 对于无法识别的压缩值将引发 :exc:`NotImplementedError`。 "
3668
+ "在之前版本中是引发简单的 :exc:`RuntimeError`。 此外,在已关闭的 ZipFile 上调用 "
3669
+ ":class:`~zipfile.ZipFile` 或者在使用 ``'r'`` 模式创建的 ZipFile 上调用 "
3670
+ ":meth:`~zipfile.ZipFile.write` 将引发 :exc:`ValueError`。 在之前版本中,对于这些场景是引发 "
3671
+ ":exc:`RuntimeError`。"
3664
3672
3665
3673
#: ../../whatsnew/3.6.rst:2312
3666
3674
msgid ""
@@ -3671,6 +3679,9 @@ msgid ""
3671
3679
" :exc:`DeprecationWarning` in Python 3.6 and a :exc:`RuntimeError` in Python"
3672
3680
" 3.8."
3673
3681
msgstr ""
3682
+ "当自定义元类与零参数的 :func:`super` 或从方法到隐式的 ``__class__`` 闭包变量的直接引用相结合时,隐式的 "
3683
+ "``__classcell__`` 命名空间条目现在必须传到 ``type.__new__`` 进行初始化。 如果不这样做那么在 Python 3.6 "
3684
+ "中将会导致 :exc:`DeprecationWarning` 而在 Python 3.8 中将会导致 :exc:`RuntimeError`。"
3674
3685
3675
3686
#: ../../whatsnew/3.6.rst:2319
3676
3687
msgid ""
@@ -3684,6 +3695,11 @@ msgid ""
3684
3695
"plugins to the default import system shouldn't need to make any changes, as "
3685
3696
"the default import system will raise the new subclass when appropriate."
3686
3697
msgstr ""
3698
+ "随着 :exc:`ModuleNotFoundError` "
3699
+ "的引入,导入系统的消费方可能会开始期望导入系统的替代品在能适当的时候引发更具体的异常,而非不够具体的 :exc:`ImportError`。 "
3700
+ "为了在未来向此类消费方提供兼容性,完全取代 :func:`__import__` "
3701
+ "的替代导入系统的实现者需要更新其实现以便在完全未找到模块时引发新的子类。 "
3702
+ "兼容默认导入系统的插件的实现者不需要做任何更改,因为默认导入系统会在适当的时候引发新的子类。"
3687
3703
3688
3704
#: ../../whatsnew/3.6.rst:2331
3689
3705
msgid "Changes in the C API"
@@ -3734,13 +3750,18 @@ msgid ""
3734
3750
"(Contributed by Eric Smith in :issue:`25483` and Serhiy Storchaka in "
3735
3751
":issue:`27078`.)"
3736
3752
msgstr ""
3753
+ "新增 :opcode:`FORMAT_VALUE` 和 :opcode:`BUILD_STRING` 操作码作为 :ref:`格式化字符串字面值 "
3754
+ "<whatsnew36-pep498>` 实现的组成部分。 (由 Eric Smith 在 :issue:`25483` 以及 Serhiy "
3755
+ "Storchaka 在 :issue:`27078` 中贡献。)"
3737
3756
3738
3757
#: ../../whatsnew/3.6.rst:2357
3739
3758
msgid ""
3740
3759
"The new :opcode:`BUILD_CONST_KEY_MAP` opcode to optimize the creation of "
3741
3760
"dictionaries with constant keys. (Contributed by Serhiy Storchaka in "
3742
3761
":issue:`27140`.)"
3743
3762
msgstr ""
3763
+ "新增的 :opcode:`BUILD_CONST_KEY_MAP` 操作码用于优化具有常量键的字典的创建。 (由 Serhiy Storchaka 在 "
3764
+ ":issue:`27140` 中创建。)"
3744
3765
3745
3766
#: ../../whatsnew/3.6.rst:2361
3746
3767
msgid ""
@@ -3753,13 +3774,21 @@ msgid ""
3753
3774
"``MAKE_CLOSURE`` opcodes have been removed. (Contributed by Demur Rumed in "
3754
3775
":issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.)"
3755
3776
msgstr ""
3777
+ "函数调用操作码进行了大幅改进以提升效率并简化实现。 :opcode:`MAKE_FUNCTION`, :opcode:`CALL_FUNCTION`, "
3778
+ ":opcode:`CALL_FUNCTION_KW` 和 :opcode:`BUILD_MAP_UNPACK_WITH_CALL` "
3779
+ "操作码已被修改,新增了 :opcode:`CALL_FUNCTION_EX` 和 "
3780
+ ":opcode:`BUILD_TUPLE_UNPACK_WITH_CALL`,并移除了 ``CALL_FUNCTION_VAR``, "
3781
+ "``CALL_FUNCTION_VAR_KW`` 和 ``MAKE_CLOSURE`` 操作码。 (由 Demur Rumed 在 "
3782
+ ":issue:`27095` 中,以及 Serhiy Storchaka 在 :issue:`27213`, :issue:`28257` 中贡献。)"
3756
3783
3757
3784
#: ../../whatsnew/3.6.rst:2372
3758
3785
msgid ""
3759
3786
"The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes "
3760
3787
"have been added to support the new :term:`variable annotation` syntax. "
3761
3788
"(Contributed by Ivan Levkivskyi in :issue:`27985`.)"
3762
3789
msgstr ""
3790
+ "新增了 :opcode:`SETUP_ANNOTATIONS` 和 :opcode:`STORE_ANNOTATION` 操作码以支持新的 "
3791
+ ":term:`variable annotation` 语法。 (由 Ivan Levkivskyi 在 :issue:`27985` 中贡献。)"
3763
3792
3764
3793
#: ../../whatsnew/3.6.rst:2378
3765
3794
msgid "Notable changes in Python 3.6.2"
@@ -3776,19 +3805,23 @@ msgid ""
3776
3805
"available, the autotools-based build system no longer attempts to implicitly"
3777
3806
" recompile generated files based on file modification times."
3778
3807
msgstr ""
3808
+ "为了简化交叉编译,并确保 CPython 能够可靠地编译而不需要已存在可用的 Python 版本,基于 autotools "
3809
+ "的构建系统将不再尝试根据文件修改时间隐式地重新编译已生成的文件。"
3779
3810
3780
3811
#: ../../whatsnew/3.6.rst:2388
3781
3812
msgid ""
3782
3813
"Instead, a new ``make regen-all`` command has been added to force "
3783
3814
"regeneration of these files when desired (e.g. after an initial version of "
3784
3815
"Python has already been built based on the pregenerated versions)."
3785
3816
msgstr ""
3817
+ "取而代之的是,新增了一个 ``make regen-all`` 命令以便在需要时强制重新生成这些文件(例如在基于预生成版本构建了 Python "
3818
+ "的初始版本之后)。"
3786
3819
3787
3820
#: ../../whatsnew/3.6.rst:2392
3788
3821
msgid ""
3789
3822
"More selective regeneration targets are also defined - see "
3790
3823
":source:`Makefile.pre.in` for details."
3791
- msgstr ""
3824
+ msgstr "还定义了其他一些更具选择性的重生成目标 —— 详情参见 :source:`Makefile.pre.in`。 "
3792
3825
3793
3826
#: ../../whatsnew/3.6.rst:2395 ../../whatsnew/3.6.rst:2408
3794
3827
msgid "(Contributed by Victor Stinner in :issue:`23404`.)"
0 commit comments