@@ -3921,6 +3921,12 @@ msgid ""
39213921"do, else simply define :meth:`~importlib.machinery.Loader.create_module` to "
39223922"return ``None``. (Contributed by Brett Cannon in :issue:`23014`.)"
39233923msgstr ""
3924+ "现在当一个导入加载器定义了 :meth:`importlib.machinery.Loader.exec_module` 时它也应该定义 "
3925+ ":meth:`~importlib.machinery.Loader.create_module` (现在会引发 "
3926+ ":exc:`DeprecationWarning`,在 Python 3.6 中将引发错误)。 如果加载器是继承自 "
3927+ ":class:`importlib.abc.Loader` 那么就不需要做什么,在其他情况下只须定义 "
3928+ ":meth:`~importlib.machinery.Loader.create_module` 来返回 ``None``。 (由 Brett "
3929+ "Cannon 在 :issue:`23014` 中贡献。)"
39243930
39253931#: ../../whatsnew/3.5.rst:2451
39263932msgid ""
@@ -3932,6 +3938,10 @@ msgid ""
39323938"that could only match an empty string (such as ``\"\\ b\" ``) now raise an "
39333939"error. (Contributed by Serhiy Storchaka in :issue:`22818`.)"
39343940msgstr ""
3941+ ":func:`re.split` 函数总是会忽略空的模式匹配,因此 ``\" x*\" `` 模式的效果与 ``\" x+\" `` 相同,而 "
3942+ "``\"\\ b\" `` 模式则没有效果。 现在当模式将匹配空字符串时 :func:`re.split` 会引发一个警告。 "
3943+ "为保持兼容性,请使用绝不会匹配空字符串的模式 (例如使用 ``\" x+\" `` 而不是 ``\" x*\" ``)。 只匹配空字符串的模式 (例如 "
3944+ "``\"\\ b\" ``) 现在会引发一个错误。 (由 Serhiy Storchaka 在 :issue:`22818` 中贡献。)"
39353945
39363946#: ../../whatsnew/3.5.rst:2459
39373947msgid ""
@@ -4050,6 +4060,9 @@ msgid ""
40504060":c:func:`PyUnicode_FromFormat`-like functions to format the :func:`repr` of "
40514061"the object. (Contributed by Serhiy Storchaka in :issue:`22453`.)"
40524062msgstr ""
4063+ "移除了会泄漏引用的未写入文档的宏 :c:macro:`!PyObject_REPR()`。请在 "
4064+ ":c:func:`PyUnicode_FromFormat` 之类的函数中使用格式符 ``%R`` 来格式化对象的 :func:`repr`。 (由 "
4065+ "Serhiy Storchaka 在 :issue:`22453` 中贡献。)"
40534066
40544067#: ../../whatsnew/3.5.rst:2529
40554068msgid ""
@@ -4058,6 +4071,9 @@ msgid ""
40584071" the :attr:`__module__` attribute. This would be an AttributeError in the "
40594072"future. (Contributed by Serhiy Storchaka in :issue:`20204`.)"
40604073msgstr ""
4074+ "由于缺少 :attr:`__module__` 属性会破坏封存和内省特性,现在对于没有 :attr:`__module__` "
4075+ "属性的内置类型会引发弃用警告。 这在将来会改为 AttributeError。 (由 Serhiy Storchaka 在 :issue:`20204`"
4076+ " 中贡献。)"
40614077
40624078#: ../../whatsnew/3.5.rst:2535
40634079msgid ""
@@ -4066,6 +4082,9 @@ msgid ""
40664082":c:member:`~PyTypeObject.tp_as_async` slot. Refer to :ref:`coro-objects` "
40674083"for new types, structures and functions."
40684084msgstr ""
4085+ "作为 :pep:`492` 实现的一部分,:c:type:`PyTypeObject` 的 ``tp_reserved`` 槽位被替换为 "
4086+ ":c:member:`~PyTypeObject.tp_as_async` 槽位。 请参看 :ref:`coro-objects` "
4087+ "了解相关的新类型、结构体和函数。"
40694088
40704089#: ../../whatsnew/3.5.rst:2542
40714090msgid "Notable changes in Python 3.5.4"
0 commit comments