pep-0492: TypeError if an object without __aiter__ is passed to async for
This commit is contained in:
parent
3aee121333
commit
f4baf032f3
|
@ -306,9 +306,9 @@ which is semantically equivalent to::
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue