1
0
forked from VimPlug/jedi

Need py__bool__ on generators as well as any other object.

This commit is contained in:
Dave Halter
2015-02-27 12:35:28 +01:00
parent 23fe08363d
commit 2b1ddb19c9
2 changed files with 13 additions and 3 deletions

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