Re: Passing functions around and executing

2008-05-14 Thread Arnaud Delobelle
alex23 <[EMAIL PROTECTED]> writes: > On May 15, 10:53 am, PatrickMinnesota <[EMAIL PROTECTED]> > wrote: >> I have a bunch of functions. I want to put them in a list. Then I >> want to pass that list into another function which does some setup and >> then loops through the list of passed in funct

Re: Passing functions around and executing

2008-05-14 Thread alex23
On May 15, 10:53 am, PatrickMinnesota <[EMAIL PROTECTED]> wrote: > I have a bunch of functions. I want to put them in a list. Then I > want to pass that list into another function which does some setup and > then loops through the list of passed in functions and executes them. > Some of them need

Re: Passing functions around and executing

2008-05-14 Thread Patrick Mullen
Here's a quick dumb example, hope it helps: def function1(a,b,c): print a,b,c def function2(x): print x def function3(y): print y+3 def executeall(list): print "setting up" for function,args in list: function(*args) #Calls the function passing in the arguments mylist = [[f

Passing functions around and executing

2008-05-14 Thread PatrickMinnesota
I've been reading the docs and looking for an answer and seem stuck. I'm either not looking in the right places or not understanding what I'm reading. I have a bunch of functions. I want to put them in a list. Then I want to pass that list into another function which does some setup and then loo