@@ -88,6 +88,9 @@ msgid ""
8888"create a class or separate :meth:`~object.__enter__` and "
8989":meth:`~object.__exit__` methods."
9090msgstr ""
91+ "此函数是一个 :term:`decorator`,它可被用来定义一个支持 :keyword:`with` "
92+ "语句上下文管理器的工厂函数,而无需创建一个类或单独的 :meth:`~object.__enter__` 和 "
93+ ":meth:`~object.__exit__` 方法。"
9194
9295#: ../../library/contextlib.rst:50
9396msgid ""
@@ -475,7 +478,7 @@ msgstr "例如,通过一个如下的 with 语句可以很容易处理一组文
475478msgid ""
476479"The :meth:`~object.__enter__` method returns the :class:`ExitStack` "
477480"instance, and performs no additional operations."
478- msgstr ""
481+ msgstr ":meth:`~object.__enter__` 方法返回 :class:`ExitStack` 的实例,并且不会执行额外的操作。 "
479482
480483#: ../../library/contextlib.rst:521
481484msgid ""
@@ -522,6 +525,8 @@ msgid ""
522525" the callback stack. The return value is the result of the context manager's"
523526" own :meth:`~object.__enter__` method."
524527msgstr ""
528+ "进入一个新的上下文管理器并将其 :meth:`~object.__exit__` 方法添加到回调栈中。 返回值是该上下文管理器自己的 "
529+ ":meth:`~object.__enter__` 方法的输出结果。"
525530
526531#: ../../library/contextlib.rst:550
527532msgid ""
@@ -539,7 +544,7 @@ msgstr "如果 *cm* 不是上下文管理器则会引发 :exc:`TypeError` 而不
539544msgid ""
540545"Adds a context manager's :meth:`~object.__exit__` method to the callback "
541546"stack."
542- msgstr ""
547+ msgstr "将一个上下文管理器的 :meth:`~object.__exit__` 方法添加到回调栈。 "
543548
544549#: ../../library/contextlib.rst:561
545550msgid ""
0 commit comments