pep-492: Mention AsyncIterator and AsyncIterable ABCs.
This commit is contained in:
parent
7396e82840
commit
7f5989e99b
13
pep-0492.txt
13
pep-0492.txt
|
@ -710,6 +710,14 @@ Abstract Base Classes (ABC) are added:
|
|||
implement ``send(value)``, ``throw(type, exc, tb)``, and ``close()``
|
||||
methods.
|
||||
|
||||
To allow easy testing if objects support asynchronous iteration, two
|
||||
more ABCs are added:
|
||||
|
||||
* ``collections.abc.AsyncIterable`` -- tests for ``__aiter__`` method.
|
||||
|
||||
* ``collections.abc.AsyncIterator`` -- tests for ``__aiter__`` and
|
||||
``__anext__`` methods.
|
||||
|
||||
|
||||
Glossary
|
||||
========
|
||||
|
@ -1329,8 +1337,9 @@ List of high-level changes and new protocols
|
|||
7. New ``CO_COROUTINE`` and ``CO_ITERABLE_COROUTINE`` bit flags for code
|
||||
objects.
|
||||
|
||||
8. New ABCs: ``collections.abc.Awaitable`` and
|
||||
``collections.abc.Coroutine``.
|
||||
8. New ABCs: ``collections.abc.Awaitable``,
|
||||
``collections.abc.Coroutine``, ``collections.abc.AsyncIterable``, and
|
||||
``collections.abc.AsyncIterator``.
|
||||
|
||||
While the list of changes and new things is not short, it is important
|
||||
to understand, that most users will not use these features directly.
|
||||
|
|
Loading…
Reference in New Issue