pep-0492: Add that it's a TypeError if __await__ returns non-iterator

This commit is contained in:
Yury Selivanov 2015-04-23 14:42:24 -04:00
parent 5dce7dd65f
commit 8935feb87c
1 changed files with 3 additions and 0 deletions

View File

@ -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.