forked from VimPlug/jedi
Need py__bool__ on generators as well as any other object.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user