Re: Function params with **? what do these mean?

2006-03-23 Thread Ben Finney
Scott David Daniels <[EMAIL PROTECTED]> writes: > At the risk of being thought of as beating a dead horse, this was a > _great_ way to ask this question. [...] > So, anyhow, thanks for taking the time to write your question properly. Take that risk, please. There's enough lambasting of (and proba

Re: Function params with **? what do these mean?

2006-03-23 Thread Scott David Daniels
J Rice wrote: > I'm sorry for such a basic question, but I haven't been able to phrase > a search that gets me an answer and my books are totally silent on > this. I have seen a number of python function defs that take > parameters of the form (**param1). Looks like a pointer... but my > books on

Re: Function params with **? what do these mean?

2006-03-20 Thread Carl Banks
Aahz wrote: > Personally, I think it's a Good Idea to stick with the semi-standard > names of *args and **kwargs to make searching easier... I usually do stick to these names (since the I usually only use them when forwarding arguments to another function, where such names are a pretty good descri

Re: Function params with **? what do these mean?

2006-03-20 Thread Dave Benjamin
On Mon, 20 Mar 2006, Ben Cartwright wrote: > Dave Hansen wrote: >> On 20 Mar 2006 15:45:36 -0800 in comp.lang.python, >> [EMAIL PROTECTED] (Aahz) wrote: >>> Personally, I think it's a Good Idea to stick with the semi-standard >>> names of *args and **kwargs to make searching easier... >> >> Agreed

Re: Function params with **? what do these mean?

2006-03-20 Thread Ben Cartwright
Dave Hansen wrote: > On 20 Mar 2006 15:45:36 -0800 in comp.lang.python, > [EMAIL PROTECTED] (Aahz) wrote: > >Personally, I think it's a Good Idea to stick with the semi-standard > >names of *args and **kwargs to make searching easier... > > Agreed (though "kwargs" kinda makes my skin crawl). Coinc

Re: Function params with **? what do these mean?

2006-03-20 Thread Dave Hansen
On 20 Mar 2006 15:45:36 -0800 in comp.lang.python, [EMAIL PROTECTED] (Aahz) wrote: >In article <[EMAIL PROTECTED]>, >Dave Hansen <[EMAIL PROTECTED]> wrote: [...] >>It's harder to explain than understand. Try playing with the >>following function in the python interpreter: >> >> def test(a,b='b

Re: Function params with **? what do these mean?

2006-03-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Dave Hansen <[EMAIL PROTECTED]> wrote: >On 20 Mar 2006 12:46:43 -0800 in comp.lang.python, "J Rice" ><[EMAIL PROTECTED]> wrote: >> >>I'm sorry for such a basic question, but I haven't been able to phrase >>a search that gets me an answer and my books are totally sil

Re: Function params with **? what do these mean?

2006-03-20 Thread J Rice
Wow, this is incredibly useful! I can understand why an introductory book wouldn't make use of them, but I am really glad to know about them. I can think of a bunch of ways to simply some code I have using this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Function params with **? what do these mean?

2006-03-20 Thread Larry Bates
J Rice wrote: > I'm sorry for such a basic question, but I haven't been able to phrase > a search that gets me an answer and my books are totally silent on > this. I have seen a number of python function defs that take > parameters of the form (**param1). Looks like a pointer... but my > books on

Re: Function params with **? what do these mean?

2006-03-20 Thread Jordan Greenberg
in the parameter list, **param gets a dict of arguments that dont correspond to somthing in the formal parameter list. More & examples in the python docs: http://docs.python.org/tut/node6.html#SECTION00672 -- Jordan T. Greenberg -- http://mail.python.org/mailman/listinfo/python

Re: Function params with **? what do these mean?

2006-03-20 Thread Dave Hansen
On 20 Mar 2006 12:46:43 -0800 in comp.lang.python, "J Rice" <[EMAIL PROTECTED]> wrote: >I'm sorry for such a basic question, but I haven't been able to phrase >a search that gets me an answer and my books are totally silent on >this. I have seen a number of python function defs that take >paramet

Function params with **? what do these mean?

2006-03-20 Thread J Rice
I'm sorry for such a basic question, but I haven't been able to phrase a search that gets me an answer and my books are totally silent on this. I have seen a number of python function defs that take parameters of the form (**param1). Looks like a pointer... but my books on python (basic as they a