@@ -805,89 +805,96 @@ msgid ""
805805"expressions, :keyword:`async for` and :keyword:`async with` can only be used"
806806" in coroutine function bodies."
807807msgstr ""
808+ "Python 协程可以在多个位置上挂起和恢复执行 (参见 :term:`coroutine`)。 在协程函数体内部,``await`` 和 "
809+ "``async`` 标识符已成为保留关键字;:keyword:`await` 表达式,:keyword:`async for` 以及 "
810+ ":keyword:`async with` 只能在协程函数体中使用。"
808811
809812#: ../../reference/compound_stmts.rst:740
810813msgid ""
811814"Functions defined with ``async def`` syntax are always coroutine functions, "
812815"even if they do not contain ``await`` or ``async`` keywords."
813- msgstr ""
816+ msgstr "使用 ``async def`` 语法定义的函数总是为协程函数,即使它们不包含 ``await`` 或 ``async`` 关键字。 "
814817
815818#: ../../reference/compound_stmts.rst:743
816819msgid ""
817820"It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the "
818821"body of a coroutine function."
819- msgstr ""
822+ msgstr "在协程函数体中使用 ``yield from`` 表达式将引发 :exc:`SyntaxError`。 "
820823
821824#: ../../reference/compound_stmts.rst:746
822825msgid "An example of a coroutine function::"
823- msgstr ""
826+ msgstr "协程函数的例子:: "
824827
825828#: ../../reference/compound_stmts.rst:757
826829msgid "The :keyword:`!async for` statement"
827- msgstr ""
830+ msgstr ":keyword:`!async for` 语句 "
828831
829832#: ../../reference/compound_stmts.rst:762
830833msgid ""
831834"An :term:`asynchronous iterable` is able to call asynchronous code in its "
832835"*iter* implementation, and :term:`asynchronous iterator` can call "
833836"asynchronous code in its *next* method."
834837msgstr ""
838+ ":term:`asynchronous iterable` 能够在其 *iter* 实现中调用异步代码,而 :term:`asynchronous "
839+ "iterator` 可以在其 *next* 方法中调用异步代码。"
835840
836841#: ../../reference/compound_stmts.rst:766
837842msgid ""
838843"The ``async for`` statement allows convenient iteration over asynchronous "
839844"iterators."
840- msgstr ""
845+ msgstr "``async for`` 语句允许方便地对异步迭代器进行迭代。 "
841846
842847#: ../../reference/compound_stmts.rst:769
843848#: ../../reference/compound_stmts.rst:809
844849msgid "The following code::"
845- msgstr ""
850+ msgstr "以下代码:: "
846851
847852#: ../../reference/compound_stmts.rst:776
848853#: ../../reference/compound_stmts.rst:814
849854msgid "Is semantically equivalent to::"
850- msgstr ""
855+ msgstr "在语义上等价于:: "
851856
852857#: ../../reference/compound_stmts.rst:791
853858msgid "See also :meth:`__aiter__` and :meth:`__anext__` for details."
854- msgstr ""
859+ msgstr "另请参阅 :meth:`__aiter__` 和 :meth:`__anext__` 了解详情。 "
855860
856861#: ../../reference/compound_stmts.rst:793
857862msgid ""
858863"It is a :exc:`SyntaxError` to use an ``async for`` statement outside the "
859864"body of a coroutine function."
860- msgstr ""
865+ msgstr "在协程函数体之外使用 ``async for`` 语句将引发 :exc:`SyntaxError`。 "
861866
862867#: ../../reference/compound_stmts.rst:801
863868msgid "The :keyword:`!async with` statement"
864- msgstr ""
869+ msgstr ":keyword:`!async with` 语句 "
865870
866871#: ../../reference/compound_stmts.rst:806
867872msgid ""
868873"An :term:`asynchronous context manager` is a :term:`context manager` that is"
869874" able to suspend execution in its *enter* and *exit* methods."
870875msgstr ""
876+ ":term:`asynchronous context manager` 是一种 :term:`context manager`,能够在其 "
877+ "*enter* 和 *exit* 方法中暂停执行。"
871878
872879#: ../../reference/compound_stmts.rst:829
873880msgid "See also :meth:`__aenter__` and :meth:`__aexit__` for details."
874- msgstr ""
881+ msgstr "另请参阅 :meth:`__aenter__` 和 :meth:`__aexit__` 了解详情。 "
875882
876883#: ../../reference/compound_stmts.rst:831
877884msgid ""
878885"It is a :exc:`SyntaxError` to use an ``async with`` statement outside the "
879886"body of a coroutine function."
880- msgstr ""
887+ msgstr "在协程函数体之外使用 ``async with`` 语句将引发 :exc:`SyntaxError`。 "
881888
882889#: ../../reference/compound_stmts.rst:837
883890msgid ":pep:`492` - Coroutines with async and await syntax"
884- msgstr ""
891+ msgstr ":pep:`492` - 使用 async 和 await 语法实现协程 "
885892
886893#: ../../reference/compound_stmts.rst:837
887894msgid ""
888895"The proposal that made coroutines a proper standalone concept in Python, and"
889896" added supporting syntax."
890- msgstr ""
897+ msgstr "将协程作为 Python 中的一个正式的单独概念,并增加相应的支持语法。 "
891898
892899#: ../../reference/compound_stmts.rst:842
893900msgid "Footnotes"
@@ -898,18 +905,20 @@ msgid ""
898905"The exception is propagated to the invocation stack unless there is a "
899906":keyword:`finally` clause which happens to raise another exception. That new"
900907" exception causes the old one to be lost."
901- msgstr ""
908+ msgstr "异常会被传播给发起调用栈,除非存在一个 :keyword:`finally` 子句正好引发了另一个异常。 新引发的异常将导致旧异常的丢失。 "
902909
903910#: ../../reference/compound_stmts.rst:847
904911msgid ""
905912"A string literal appearing as the first statement in the function body is "
906913"transformed into the function's ``__doc__`` attribute and therefore the "
907914"function's :term:`docstring`."
908915msgstr ""
916+ "作为函数体的第一条语句出现的字符串字面值会被转换为函数的 ``__doc__`` 属性,也就是该函数的 :term:`docstring`。"
909917
910918#: ../../reference/compound_stmts.rst:851
911919msgid ""
912920"A string literal appearing as the first statement in the class body is "
913921"transformed into the namespace's ``__doc__`` item and therefore the class's "
914922":term:`docstring`."
915923msgstr ""
924+ "作为类体的第一条语句出现的字符串字面值会被转换为命名空间的 ``__doc__`` 条目,也就是该类的 :term:`docstring`。"
0 commit comments