python - Function with arguments from other function -
how can create this:
def test(a) return def invoker(func): func() #here need call function twice , sum result (test function) invoker(test(10), test(15))
i think arbitrary argument lists looking for: http://docs.python.org/dev/tutorial/controlflow.html#arbitrary-argument-lists
def test(a): return def invoker(*args): print sum(args) # prints 25 print args # prints (10, 15) invoker(test(10), test(15))
Comments
Post a Comment