8000 [po] auto sync · python/python-docs-zh-cn@15b5209 · GitHub
[go: up one dir, main page]

Skip to content

Commit 15b5209

Browse files
[po] auto sync
1 parent 978dbf5 commit 15b5209

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.35%", "updated_at": "2025-04-16T06:57:11Z"}
1+
{"translation": "81.36%", "updated_at": "2025-04-17T08:57:00Z"}

whatsnew/3.4.po

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4125,6 +4125,9 @@ msgid ""
41254125
"compatibility, catch both :exc:`NotImplementedError` or the appropriate "
41264126
"exception as needed."
41274127
msgstr ""
4128+
"在 :mod:`importlib.abc` 中定义的 ABC 现在将会引发适当的异常或是返回默认值而不是无脑引发 "
4129+
":exc:`NotImplementedError`。 这将只影响调用 :func:`super` 并一路下落到这些 ABC 的代码。 "
4130+
"为保持兼容性,:exc:`NotImplementedError` 和所需的相应异常都要被捕获。"
41284131

41294132
#: ../../whatsnew/3.4.rst:2274
41304133
msgid ""
@@ -4133,6 +4136,9 @@ msgid ""
41334136
"if these attributes were set in a backwards-compatible fashion, use e.g. "
41344137
"``getattr(module, '__loader__', None) is not None``. (:issue:`17115`.)"
41354138
msgstr ""
4139+
"模块类型现在默认会将 :attr:`~module.__package__` 和 :attr:`~module.__loader__` 属性初始化为 "
4140+
"``None``。 要确定这些属性是否以向下兼容的方式被设置,可使用像 ``getattr(module, '__loader__', None) is"
4141+
" not None`` 这样的写法。 (:issue:`17115`。)"
41364142

41374143
#: ../../whatsnew/3.4.rst:2280
41384144
msgid ""
@@ -4141,6 +4147,9 @@ msgid ""
41414147
"not desired then you will need to set these attributes manually. You can use"
41424148
" :func:`importlib.util.module_to_load` for module management."
41434149
msgstr ""
4150+
"现在 :meth:`!importlib.util.module_for_loader` 会无条件地设置 ``__loader__`` 和 "
4151+
"``__package__`` 以正确地支持重加载。 如果不希望如此那么你将需要手动设置这些属性。 你可以使用 "
4152+
":func:`importlib.util.module_to_load` 进行模块管理。"
41444153

41454154
#: ../../whatsnew/3.4.rst:2285
41464155
msgid ""
@@ -4149,6 +4158,9 @@ msgid ""
41494158
"reloading. Note that this restores a pre-3.3 behavior in that it means a "
41504159
"module is re-found when re-loaded (:issue:`19413`)."
41514160
msgstr ""
4161+
"当重载时 import 操作现在会无条件地重置相关属性 (例如 ``__name__``, ``__loader__``, "
4162+
"``__package__``, ``__file__``, ``__cached__``)。 请注意在模块重载时会被重发现这一点上该操作恢复了 3.3"
4163+
" 之前的行为 (:issue:`19413`)。"
41524164

41534165
#: ../../whatsnew/3.4.rst:2290
41544166
msgid ""
@@ -4463,6 +4475,11 @@ msgid ""
44634475
"when invoking these operations (directly or indirectly) and running against "
44644476
"a version of Python that is compiled with assertions enabled."
44654477
msgstr ""
4478+
"现在 :c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr` 和 "
4479+
":c:func:`PyObject_Str` 以及其他一些内部 C API "
4480+
"都包括了一个调试断言,以确保它们不会在可能会静默地丢弃当前活动异常的情况下使用。 在预期并且希望丢弃活动异常的情况下(例如,由于已通过 "
4481+
":c:func:`PyErr_Fetch` 将其保存在本地或是有意将其替换为不同的异常 ),则需调用显式的 :c:func:`PyErr_Clear` "
4482+
"以避免在(直接或间接)唤起这些操作和针对启用断言编译的 Python 的版本运行时触发断言。"
44664483

44674484
#: ../../whatsnew/3.4.rst:2500
44684485
msgid ""

0 commit comments

Comments
 (0)
0