Skip to content

Commit 78de330

Browse files
committed
A few editorial fixes.
1 parent 86e24cb commit 78de330

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

peps/pep-9999.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ All subgenerator delegation semantics are retained.
188188

189189
1. :meth:`~object.__aiter__` is called to retrieve the asynchronous
190190
generator iterator.
191-
2. :meth:`~agen.asend` is called to advance the asynchronous generator.
191+
2. :meth:`~agen.asend` is called to advance the asynchronous generato
192+
iterator.
192193

193194
``async yield from`` is only allowed in an asynchronous generator function;
194195
using it elsewhere will raise a :exc:`SyntaxError`.
@@ -203,7 +204,7 @@ In an asynchronous generator, ``async yield from`` is conceptually equivalent to
203204
``async yield from`` retains all the subgenerator delegation behavior present
204205
in standard ``yield from`` expressions. This behavior is outlined in :pep:`380`
205206
and :ref:`the documentation <yieldexpr>`. In short, values passed with
206-
:meth:`~generator.send` and exceptions supplied with :meth:`~generator.throw`
207+
:meth:`~agen.asend` and exceptions supplied with :meth:`~agen.athrow`
207208
are also passed to the target generator.
208209

209210

@@ -288,11 +289,12 @@ intends to be very intuitive; users should be able to deduce the behavior of
288289
``yield from`` in an asynchronous generator based on their own background
289290
knowledge of ``yield from`` in synchronous generators.
290291

292+
291293
Potential footguns
292294
------------------
293295

294-
Forgetting to ``await`` before ``yield from``
295-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
296+
Forgetting to ``await`` a future
297+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
296298

297299
In :mod:`asyncio`, a :ref:`future <asyncio-future-obj>` object is natively
298300
iterable. This means that if one were trying to iterate over the result of a
@@ -340,9 +342,7 @@ Acknowledgements
340342
================
341343

342344
Thanks to Bartosz Sławecki for aiding in the development of the reference
343-
implementation of this PEP.
344-
345-
In the reference implementation of this proposal, the :exc:`StopAsyncIteration`
345+
implementation of this PEP. In addition, the :exc:`StopAsyncIteration`
346346
changes in addition to the support for non-``None`` return values inside
347347
asynchronous generators were largely based on Alex Dixon's design from
348348
`python/cpython#125401 <https://github.com/python/cpython/pull/125401>`_

0 commit comments

Comments
 (0)