What does "*list" mean?

Raymond Hettinger vze4rx4y at verizon.net
Thu Jul 31 20:12:02 EDT 2003


"Diez B. Roggisch" <deets_noospaam at web.de> wrote in message
news:bgbkmf$gn9$05$1 at news.t-online.com...
> Greg Smethells wrote:
>
> > What exactly does "*values" mean in the following code? Is this a
> > pointer to a PyList? Why can I not find good documentation on this any
> > where? I must be blind:
>
> Just two days ago I had the same qustion, and I got this as answer from
> Raymond Hettinger:
>
> http://www.python.org/dev/doc/devel/ref/calls.html
>
> Regarding your C question: I didn't do such a thing, but *list only makes
> the items of list be used as distinct arguments - so its more a matter of
> the function signature you're calling. I'm sure you'll find something about
> variable list arguments somewhere - that means that you function looks like
> this:
>
> def foo(arg1, arg2, *args):

Hmm, it sounds like the *args calling format
needs to be added to the tutorial.


Raymond Hettinger






More information about the Python-list mailing list