@@ -900,10 +900,15 @@ msgid ""
900900"exception is raised and the iterator will have reached the end of the set of"
901901" values to be returned."
902902msgstr ""
903+ "使用了 :keyword:`yield` 语句 (参见 :ref:`yield` 一节) 的函数或方法就被称为 "
904+ ":dfn:`生成器函数`。这样的函数在被调用时总是返回一个迭代器对象并可被用来执行函数体: 调用迭代器的 "
905+ ":meth:`iterator.__next__` 方法将使得函数继续执行直到其用 :keyword:`yield` 语句返回一个值。当函数执行到 "
906+ ":keyword:`return` 语句或是最后一条语句时,将会引发 :exc:`StopIteration` "
907+ "异常,迭代器也会到达要返回的值集合的末尾。"
903908
904909#: ../../reference/datamodel.rst:634
905910msgid "Coroutine functions"
906- msgstr ""
911+ msgstr "协程函数 "
907912
908913#: ../../reference/datamodel.rst:630
909914msgid ""
@@ -913,10 +918,13 @@ msgid ""
913918"well as :keyword:`async with` and :keyword:`async for` statements. See also "
914919"the :ref:`coroutine-objects` section."
915920msgstr ""
921+ "使用 :keyword:`async def` 来定义的函数或方法就被称为 :dfn:`协程函数`。这样的函数在被调用时会返回一个 :term:`协程`"
922+ " 对象。它可能包含 :keyword:`await` 表达式以及 :keyword:`async with` 和 :keyword:`async "
923+ "for` 语句。详情可参见 :ref:`coroutine-objects` 一节。"
916924
917925#: ../../reference/datamodel.rst:653
918926msgid "Asynchronous generator functions"
919- msgstr ""
927+ msgstr "异步生成器函数 "
920928
921929#: ../../reference/datamodel.rst:641
922930msgid ""
@@ -926,6 +934,8 @@ msgid ""
926934"object which can be used in an :keyword:`async for` statement to execute the"
927935" body of the function."
928936msgstr ""
937+ "使用 :keyword:`async def` 来定义并包含 :keyword:`yield` 语句的函数或方法就被称为 "
938+ ":dfn:`异步生成器函数`。这样的函数在被调用时会返回一个异步迭代器对象,该对象可在 :keyword:`async for` 语句中用来执行函数体。"
929939
930940#: ../../reference/datamodel.rst:647
931941msgid ""
@@ -936,10 +946,13 @@ msgid ""
936946":exc:`StopAsyncIteration` exception is raised and the asynchronous iterator "
937947"will have reached the end of the set of values to be yielded."
938948msgstr ""
949+ "调用异步迭代器的 :meth:`aiterator.__anext__` 方法将会返回一个 :term:`可等待对象`,此对象会在被等待时执行直到使用 "
950+ ":keyword:`yield` 表达式输出一个值。当函数执行时到空的 :keyword:`return` 语句或是最后一条语句时,将会引发 "
951+ ":exc:`StopAsyncIteration` 异常,异步迭代器也会到达要输出的值集合的末尾。"
939952
940953#: ../../reference/datamodel.rst:668
941954msgid "Built-in functions"
942- msgstr ""
955+ msgstr "内置函数 "
943956
944957#: ../../reference/datamodel.rst:661
945958msgid ""
@@ -952,10 +965,14 @@ msgid ""
952965" to ``None`` (but see the next item); :attr:`__module__` is the name of the "
953966"module the function was defined in or ``None`` if unavailable."
954967msgstr ""
968+ "内置函数对象是对于 C 函数的外部封装。内置函数的例子包括 :func:`len` 和 :func:`math.sin` (:mod:`math` "
969+ "是一个标准内置模块)。内置函数参数的数量和类型由 C 函数决定。特殊的只读属性: :attr:`__doc__` 是函数的文档字符串,如果没有则为 "
970+ "``None``; :attr:`~definition.__name__` 是函数的名称; :attr:`__self__` 设定为 ``None``"
971+ " (参见下一条目); :attr:`__module__` 是函数所属模块的名称,如果没有则为 ``None``。"
955972
956973#: ../../reference/datamodel.rst:680
957974msgid "Built-in methods"
958- msgstr ""
975+ msgstr "内置方法 "
959976
960977#: ../../reference/datamodel.rst:676
961978msgid ""
0 commit comments