Need py__bool__ on generators as well as any other object.

This commit is contained in:
Dave Halter committed 2015-02-27 12:36:03 +01:00
1 parent 23fe08363d
commit 2b1ddb19c9
2 files changed
+13 -3

No files matched your search

+7
View File
@@ -24,6 +24,13 @@ next(gen_ret(1))
#? []
next(gen_ret())
# generators evaluate to true if cast by bool.
a = ''
if gen_ret():
a = 3
#? int()
a
# -----------------
# generators should not be indexable