Message from discussion
*args and **kwargs
Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: "Diez B. Roggisch" <de...@nospam.web.de>
Newsgroups: comp.lang.python
Subject: Re: *args and **kwargs
Date: Tue, 05 Jun 2007 14:31:24 +0200
Lines: 19
Message-ID: <5cl3csF2r2kvkU1@mid.uni-berlin.de>
References: <1181046478.824231.117300@q75g2000hsh.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: news.uni-berlin.de knTtKJjiOjGLFVB1Z8wS9AXrvY1y686S8YDClkO8B7Pg==
User-Agent: KNode/0.10.4
JonathanB wrote:
> Ok, this is probably definitely a newbie question, but I have looked
> all over the Python library reference material and tutorials which I
> can find online and I cannot find a clear definition of what these are
> and more importantly how to use them. From what I can tell from their
> use in the examples I've seen, they are for passing a variable number
> of arguments to a function (which I need to do in a program I am
> working on). But how do you use them? Is there a fixed order in which
> the arguments within *arg or **kwarg should be passed or will be
> called within a function? I realize this probably involves a long-
> winded answer to a very simple and common programming problem, so if
> someone has a link to TFM, I'll gladly go RTFM. I just can't find it.
That's because it's in the language reference, not in the library reference.
http://docs.python.org/ref/calls.html
Diez