@@ -3875,6 +3875,12 @@ msgid ""
3875
3875
"do, else simply define :meth:`~importlib.machinery.Loader.create_module` to "
3876
3876
"return ``None``. (Contributed by Brett Cannon in :issue:`23014`.)"
3877
3877
msgstr ""
3878
+ "现在当一个导入加载器定义了 :meth:`importlib.machinery.Loader.exec_module` 时它也应该定义 "
3879
+ ":meth:`~importlib.machinery.Loader.create_module` (现在会引发 "
3880
+ ":exc:`DeprecationWarning`,在 Python 3.6 中将引发错误)。 如果加载器是继承自 "
3881
+ ":class:`importlib.abc.Loader` 那么就不需要做什么,在其他情况下只须定义 "
3882
+ ":meth:`~importlib.machinery.Loader.create_module` 来返回 ``None``。 (由 Brett "
3883
+ "Cannon 在 :issue:`23014` 中贡献。)"
3878
3884
3879
3885
#: ../../whatsnew/3.5.rst:2450
3880
3886
msgid ""
@@ -3886,6 +3892,10 @@ msgid ""
3886
3892
"that could only match an empty string (such as ``\"\\ b\" ``) now raise an "
3887
3893
"error. (Contributed by Serhiy Storchaka in :issue:`22818`.)"
3888
3894
msgstr ""
3895
+ ":func:`re.split` 函数总是会忽略空的模式匹配,因此 ``\" x*\" `` 模式的效果与 ``\" x+\" `` 相同,而 "
3896
+ "``\"\\ b\" `` 模式则没有效果。 现在当模式将匹配空字符串时 :func:`re.split` 会引发一个警告。 "
3897
+ "为保持兼容性,请使用绝不会匹配空字符串的模式 (例如使用 ``\" x+\" `` 而不是 ``\" x*\" ``)。 只匹配空字符串的模式 (例如 "
3898
+ "``\"\\ b\" ``) 现在会引发一个错误。 (由 Serhiy Storchaka 在 :issue:`22818` 中贡献。)"
3889
3899
3890
3900
#: ../../whatsnew/3.5.rst:2458
3891
3901
msgid ""
@@ -4011,6 +4021,9 @@ msgid ""
4011
4021
" the :attr:`__module__` attribute. This would be an AttributeError in the "
4012
4022
"future. (Contributed by Serhiy Storchaka in :issue:`20204`.)"
4013
4023
msgstr ""
4024
+ "由于缺少 :attr:`__module__` 属性会破坏封存和内省特性,现在对于没有 :attr:`__module__` "
4025
+ "属性的内置类型会引发弃用警告。 这在将来会改为 AttributeError。 (由 Serhiy Storchaka 在 :issue:`20204`"
4026
+ " 中贡献。)"
4014
4027
4015
4028
#: ../../whatsnew/3.5.rst:2534
4016
4029
msgid ""
0 commit comments