[Python-checkins] peps: pep-0492: Add that it's a TypeError if __await__ returns non-iterator

yury.selivanov python-checkins at python.org
Thu Apr 23 20:42:29 CEST 2015


https://hg.python.org/peps/rev/a0b8dc058d06
changeset: 5789:a0b8dc058d06
user: Yury Selivanov <yselivanov at sprymix.com>
date: Thu Apr 23 14:42:24 2015 -0400
summary:
 pep-0492: Add that it's a TypeError if __await__ returns non-iterator
files:
 pep-0492.txt | 3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -152,6 +152,9 @@
 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.
 
 
-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /