1010# zeroswan <[email protected] >, 20201111# Heyi Tang <[email protected] >, 20201212# Freesand Leo <[email protected] >, 202213+ # Nyuan Zhang, 2022
1314#
1415#, fuzzy
1516msgid ""
@@ -18,7 +19,7 @@ msgstr ""
1819"Report-Msgid-Bugs-To : \n "
1920"POT-Creation-Date : 2021-06-05 06:33+0000\n "
2021"PO-Revision-Date : 2017-02-16 23:04+0000\n "
21- "
Last-Translator :
Freesand Leo <[email protected] > , 2022\n"
22+ "Last-Translator : Nyuan Zhang , 2022\n "
2223"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2324"MIME-Version : 1.0\n "
2425"Content-Type : text/plain; charset=UTF-8\n "
@@ -491,31 +492,31 @@ msgstr ""
491492msgid ""
492493"The :meth:`close` method is not implemented, :meth:`aclose` must be used "
493494"instead."
494- msgstr ""
495+ msgstr ":meth:`close` 方法没有被实现,使用 :meth:`aclose` 替代。 "
495496
496497#: ../../library/contextlib.rst:470
497498msgid ""
498499"Similar to :meth:`enter_context` but expects an asynchronous context "
499500"manager."
500- msgstr ""
501+ msgstr "与 :meth:`enter_context` 相近,但是需要一个异步上下文管理器。 "
501502
502503#: ../../library/contextlib.rst:475
503504msgid ""
504505"Similar to :meth:`push` but expects either an asynchronous context manager "
505506"or a coroutine function."
506- msgstr ""
507+ msgstr "与 :meth:`push` 相近,但是需要一个异步上下文管理器或协程函数。 "
507508
508509#: ../../library/contextlib.rst:480
509510msgid "Similar to :meth:`callback` but expects a coroutine function."
510- msgstr ""
511+ msgstr "与 :meth:`callback` 相近,但是需要一个协程函数。 "
511512
512513#: ../../library/contextlib.rst:484
513514msgid "Similar to :meth:`close` but properly handles awaitables."
514- msgstr ""
515+ msgstr "和 :meth:`close` 相近,但是它正确处理了可等待对象。 "
515516
516517#: ../../library/contextlib.rst:486
517518msgid "Continuing the example for :func:`asynccontextmanager`::"
518- msgstr ""
519+ msgstr "从 :func:`asynccontextmanager` 的例子继续: "
519520
520521#: ../../library/contextlib.rst:498
521522msgid "Examples and Recipes"
@@ -550,7 +551,7 @@ msgstr ""
550551
551552#: ../../library/contextlib.rst:528
552553msgid "Catching exceptions from ``__enter__`` methods"
553- msgstr ""
554+ msgstr "捕获 ``__enter__`` 方法产生的异常 "
554555
555556#: ../../library/contextlib.rst:530
556557msgid ""
@@ -574,7 +575,7 @@ msgstr ""
574575
575576#: ../../library/contextlib.rst:555
576577msgid "Cleaning up in an ``__enter__`` implementation"
577- msgstr ""
578+ msgstr "在一个 ``__enter__`` 方法的实现中进行清理 "
578579
579580#: ../../library/contextlib.rst:557
580581msgid ""
@@ -644,13 +645,13 @@ msgstr ""
644645
645646#: ../../library/contextlib.rst:675
646647msgid "Using a context manager as a function decorator"
647- msgstr ""
648+ msgstr "将上下文管理器作为函数装饰器使用 "
648649
649650#: ../../library/contextlib.rst:677
650651msgid ""
651652":class:`ContextDecorator` makes it possible to use a context manager in both"
652653" an ordinary ``with`` statement and also as a function decorator."
653- msgstr ""
654+ msgstr ":class:`ContextDecorator` 类允许将上下文管理器作为函数装饰器使用,而不仅在 ``with`` 语句块中使用。 "
654655
655656#: ../../library/contextlib.rst:680
656657msgid ""
@@ -663,11 +664,11 @@ msgstr ""
663664
664665#: ../../library/contextlib.rst:701
665666msgid "Instances of this class can be used as both a context manager::"
666- msgstr ""
667+ msgstr "这个类的实例既可以被用作上下文管理器: "
667668
668669#: ../../library/contextlib.rst:707
669670msgid "And also as a function decorator::"
670- msgstr ""
671+ msgstr "也可以被用作函数装饰器: "
671672
672673#: ../../library/contextlib.rst:714
673674msgid ""
@@ -676,6 +677,8 @@ msgid ""
676677":meth:`__enter__`. If that value is needed, then it is still necessary to "
677678"use an explicit ``with`` statement."
678679msgstr ""
680+ "使用上下文管理器作为函数装饰器时,有一个额外限制:没有办法得到 :meth:`__enter__` 的返回值。如果需要返回值,你仍然需要显式使用 "
681+ "``with`` 语句。"
679682
680683#: ../../library/contextlib.rst:722
681684msgid ":pep:`343` - The \" with\" statement"
0 commit comments