[Python-checkins] peps: pep-0492: TypeError if an object without __aiter__ is passed to async for

yury.selivanov python-checkins at python.org
Thu Apr 23 22:48:08 CEST 2015


https://hg.python.org/peps/rev/c927aa2716b8
changeset:   5798:c927aa2716b8
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Thu Apr 23 16:48:07 2015 -0400
summary:
  pep-0492: TypeError if an object without __aiter__ is passed to async for

files:
  pep-0492.txt |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -306,9 +306,9 @@
         BLOCK2
 
 
-It is an error to pass a regular iterable without ``__aiter__`` method
-to ``async for``.  It is a ``SyntaxError`` to use ``async for`` outside
-of a coroutine.
+It is a ``TypeError`` to pass a regular iterable without ``__aiter__``
+method to ``async for``.  It is a ``SyntaxError`` to use ``async for``
+outside of a coroutine.
 
 As for with regular ``for`` statement, ``async for`` has an optional
 ``else`` clause.

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


More information about the Python-checkins mailing list