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

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -