parameter passing question

Micah dropthis_fanmail at
Tue Sep 21 00:36:36 CEST 2004

Use the variable-arg techniques described in:

def foo(*args):
    # Do something with arg[0], arg[1], ...

def main():
    f = foo
    args = ["hello", "world"]


Is there a way to do it if I am not the one to define f?  In other words, if
I cannot declare f to be a variable-argument function, is there a way to do

I'm trying to write a function F that takes a function f and a list of
arguments args for f.  I leave it up to the caller of F that they pass the
correct number of arguments.

Thanks for the speedy reply,

More information about the Python-list mailing list