Re: functions with unlimeted variable arguments...

2005-06-20 Thread Peter Hansen
Xah Lee wrote: oops... it is in the tutorial... sorry. If you're sorry, have you now *finally* gone and worked through the rest of tutorial, making a serious attempt to learn it? This is not a rhetorical question, but where would one start to look for it in the python ref? a language is

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Xah Lee
oops... it is in the tutorial... sorry. though, where would one find it in the python reference? i.e. the function def with variable/default parameters. This is not a rhetorical question, but where would one start to look for it in the python ref? a language is used by programers. Subroutine

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Robert Kern
Xah Lee wrote: oops... it is in the tutorial... sorry. though, where would one find it in the python reference? i.e. the function def with variable/default parameters. This is not a rhetorical question, but where would one start to look for it in the python ref? Oddly enough,

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Diez B. Roggisch
Xah Lee wrote: oops... it is in the tutorial... sorry. though, where would one find it in the python reference? i.e. the function def with variable/default parameters. This is not a rhetorical question, but where would one start to look for it in the python ref? a language is used by

functions with unlimeted variable arguments...

2005-06-18 Thread Xah Lee
how can i define a function with variable parameters? For example, f(a) would return [a] f(a,b) would return [a,b] f(a,b,...) would return [a,b,...] One solution is of course to make the argument as a list. i.e. f([a,b,...]) but are there other solutions? Xah [EMAIL PROTECTED]

Re: functions with unlimeted variable arguments...

2005-06-18 Thread Paul Rubin
Xah Lee [EMAIL PROTECTED] writes: but are there other solutions? Xah Geez man, haven't you been around long enough to read the manual? def f(*a): return a -- http://mail.python.org/mailman/listinfo/python-list

Re: functions with unlimeted variable arguments...

2005-06-18 Thread John Machin
Xah Lee wrote: how can i define a function with variable parameters? For example, f(a) would return [a] f(a,b) would return [a,b] f(a,b,...) would return [a,b,...] One solution is of course to make the argument as a list. i.e. f([a,b,...]) but are there other solutions? def

Re: functions with unlimeted variable arguments...

2005-06-18 Thread Ivan Van Laningham
Hi All-- Paul Rubin wrote: Xah Lee [EMAIL PROTECTED] writes: but are there other solutions? Xah Geez man, haven't you been around long enough to read the manual? def f(*a): return a He's been around long enough to rewrite the manual. Metta,