> Yeah. It's so easy and obvious that you are going to bang your head
> against the wall. :) The single star does not only collect all arguments
> in a function definition. It also expands a sequence as arguments.
Thanks Christian, that worked perfectly!
Scott
--
http://mail.python.org/mailman/l
Scott wrote:
I suspect there's a simple bit of syntax that I'm missing -- can
anyone give me a hand?
Yeah. It's so easy and obvious that you are going to bang your head
against the wall. :) The single star does not only collect all arguments
in a function definition. It also expands a sequenc
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