pep-0492: Add that it's a TypeError if __await__ returns non-iterator
This commit is contained in:
parent
5dce7dd65f
commit
8935feb87c
|
@ -152,6 +152,9 @@ can be one of:
|
|||
and would be like using ``__iter__`` instead of ``__call__`` for
|
||||
regular callables.
|
||||
|
||||
It is a ``TypeError`` if ``__await__`` returns anything but an
|
||||
iterator.
|
||||
|
||||
It is a ``SyntaxError`` to use ``await`` outside of a coroutine.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue