pep-0492: TypeError if an object without __aiter__ is passed to async for

This commit is contained in:
Yury Selivanov 2015-04-23 16:48:07 -04:00
parent 3aee121333
commit f4baf032f3
1 changed files with 3 additions and 3 deletions

View File

@ -306,9 +306,9 @@ which is semantically equivalent to::
BLOCK2 BLOCK2
It is an error to pass a regular iterable without ``__aiter__`` method It is a ``TypeError`` to pass a regular iterable without ``__aiter__``
to ``async for``. It is a ``SyntaxError`` to use ``async for`` outside method to ``async for``. It is a ``SyntaxError`` to use ``async for``
of a coroutine. outside of a coroutine.
As for with regular ``for`` statement, ``async for`` has an optional As for with regular ``for`` statement, ``async for`` has an optional
``else`` clause. ``else`` clause.