I'm trying to write a function that accepts a variable number of
arguments and passes those arguments to another function. Here is an
example:

def foo(*args):
    print "I'm going to call bar with the arguments", args
    bar(args)

This doesn't do quite what I want. For example, if I call foo(1,2,3,4)
then it calls bar((1,2,3,4)). It passes a tuple rather than expanding
the argument list back out.

I suspect there's a simple bit of syntax that I'm missing -- can
anyone give me a hand?

Thanks
Scott
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to