[Python-checkins] peps: pep-492: Mention AsyncIterator and AsyncIterable ABCs.

yury.selivanov python-checkins at python.org
Fri May 15 04:05:27 CEST 2015


https://hg.python.org/peps/rev/8f453d25770c
changeset:   5851:8f453d25770c
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Thu May 14 22:05:24 2015 -0400
summary:
  pep-492: Mention AsyncIterator and AsyncIterable ABCs.

files:
  pep-0492.txt |  13 +++++++++++--
  1 files changed, 11 insertions(+), 2 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -710,6 +710,14 @@
   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 @@
 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.

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list