1
0
forked from VimPlug/jedi

generators are now working with arguments (yield stmts)

This commit is contained in:
David Halter
2012-07-10 13:36:36 +02:00
parent 37f2b8ff56
commit e4739fddf9
3 changed files with 29 additions and 13 deletions

View File

@@ -7,18 +7,23 @@ def gen():
yield ""
gen_exe = gen()
#? ['upper']
next(gen_exe).upper
#? ['real']
next(gen_exe).real
#? int() str()
next(gen_exe)
#? int() str() list
next(gen_exe, list)
def gen_ret(value):
yield value
#? int()
next(gen_ret(1))
#? []
next(gen_ret())
# -----------------
# generators should be indexable?
# generators should be indexable!???
# -----------------
def get(self):
yield 1

View File

@@ -17,5 +17,9 @@ scopes, path, dot, like = \
#? set()
el = scopes.
#? str() <--- recursion
el = evaluate.get_names_for_scope()[0].
# get_names_for_scope is also recursion stuff
#? tuple()
el = evaluate.get_names_for_scope()[0]
#? tuple()
el = evaluate.get_names_for_scope(1,2)[0][0]