diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-16 23:25:04 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-16 23:25:04 (GMT) |
commit | 22214ab0af2cbea1611b2193354f248ca6b03e87 (patch) | |
tree | f7cf45d0205d2dca9f0021f01a1551de395f370e /Doc | |
parent | 41782e497092a27efbae20208ce7d48c657e74cb (diff) | |
download | cpython-22214ab0af2cbea1611b2193354f248ca6b03e87.zip cpython-22214ab0af2cbea1611b2193354f248ca6b03e87.tar.gz cpython-22214ab0af2cbea1611b2193354f248ca6b03e87.tar.bz2 |
Issue #28720: Add collections.abc.AsyncGenerator.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.abc.rst | 8 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index e4b75a0..3ac49db 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -92,6 +92,7 @@ ABC Inherits from Abstract Methods Mixin :class:`Coroutine` :class:`Awaitable` ``send``, ``throw`` ``close`` :class:`AsyncIterable` ``__aiter__`` :class:`AsyncIterator` :class:`AsyncIterable` ``__anext__`` ``__aiter__`` +:class:`AsyncGenerator` :class:`AsyncIterator` ``asend``, ``athrow`` ``aclose``, ``__aiter__``, ``__anext__`` ========================== ====================== ======================= ==================================================== @@ -222,6 +223,13 @@ ABC Inherits from Abstract Methods Mixin .. versionadded:: 3.5 +.. class:: Generator + + ABC for asynchronous generator classes that implement the protocol + defined in :pep:`525` and :pep:`492`. + + .. versionadded:: 3.6 + These ABCs allow us to ask classes or instances if they provide particular functionality, for example:: diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 801191c..ce8ab98 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -912,6 +912,10 @@ The new :class:`~collections.abc.Reversible` abstract base class represents iterable classes that also provide the :meth:`__reversed__`. (Contributed by Ivan Levkivskyi in :issue:`25987`.) +The new :class:`~collections.abc.AsyncGenerator` abstract base class represents +asynchronous generators. +(Contributed by Yury Selivanov in :issue:`28720`.) + The :func:`~collections.namedtuple` function now accepts an optional keyword argument *module*, which, when specified, is used for the ``__module__`` attribute of the returned named tuple class. |