@@ -388,6 +388,8 @@ msgid ""
388388"handled in the same way as exceptions raised from an object's "
389389":meth:`~object.__del__` method or a weak reference's callback."
390390msgstr ""
391+ "在垃圾收集期间由终结器回调所引发的异常将显示在标准错误输出中,但无法被传播。 它们会按与对象的 :meth:`~object.__del__` "
392+ "方法或或弱引用的回调所引发的异常相同的方式被处理。"
391393
392394#: ../../library/weakref.rst:286
393395msgid ""
@@ -597,7 +599,7 @@ msgstr "对象被作为垃圾回收,"
597599
598600#: ../../library/weakref.rst:533
599601msgid "the object's :meth:`!remove` method is called, or"
600- msgstr ""
602+ msgstr "对象的 :meth:`!remove` 方法被调用,或 "
601603
602604#: ../../library/weakref.rst:534
603605msgid "the program exits."
@@ -607,7 +609,7 @@ msgstr "程序退出。"
607609msgid ""
608610"We might try to implement the class using a :meth:`~object.__del__` method "
609611"as follows::"
610- msgstr ""
612+ msgstr "我们可以像下面这样尝试使用 :meth:`~object.__del__` 方法来实现这个类:: "
611613
612614#: ../../library/weakref.rst:555
613615msgid ""
@@ -616,6 +618,9 @@ msgid ""
616618"longer forced to :const:`None` during :term:`interpreter shutdown`. So this "
617619"code should work without any issues on CPython."
618620msgstr ""
621+ "从 Python 3.4 开始,:meth:`~object.__del__` 方法会不再阻止循环引用被作为垃圾回收,并且模块全局变量在 "
622+ ":term:`interpreter shutdown` 期间不会再被强制设为 :const:`None`。 因此这段代码在 CPython "
623+ "上应该会正常运行而不会出现任何问题。"
619624
620625#: ../../library/weakref.rst:560
621626msgid ""
0 commit comments