Dennis Lee Bieber wrote:
> On Tue, 14 Nov 2006 05:45:57 GMT, "OKB (not okblacke)"
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>>
>> I was just wondering about this yesterday. Is there a
>> reason you
>> can only unpack a sequence at the END of t
Steve Holden wrote:
> Noah Rawlins wrote:
> You should be ok as long as you use the following ordering of
> actual arguments in a function call:
>
>1. Positional arguments
>2. Keyword arguments
>3. * sequence
>4. ** dict
I was just wondering about this yesterday. Is ther
Noah Rawlins wrote:
> ram wrote:
>> Stupid question #983098403:
>>
>> I can't seem to pass an unpacked sequence and keyword arguments to a
>> function at the same time. What am I doing wrong?
>>
>> def f(*args, **kw):
>> for a in args:
>> print 'arg:', a
>> for (k,v) in kw.iteritems
At Monday 13/11/2006 22:06, ram wrote:
Stupid question #983098403:
I can't seem to pass an unpacked sequence and keyword arguments to a
function at the same time. What am I doing wrong?
def f(*args, **kw):
for a in args:
print 'arg:', a
for (k,v) in kw.iteritems():
pri
ram wrote:
> Stupid question #983098403:
>
> I can't seem to pass an unpacked sequence and keyword arguments to a
> function at the same time. What am I doing wrong?
>
> def f(*args, **kw):
> for a in args:
> print 'arg:', a
> for (k,v) in kw.iteritems():
> print k, '=', v
Stupid question #983098403:
I can't seem to pass an unpacked sequence and keyword arguments to a
function at the same time. What am I doing wrong?
def f(*args, **kw):
for a in args:
print 'arg:', a
for (k,v) in kw.iteritems():
print k, '=', v
>>> f(1,2)
arg: 1
arg: 2
>>>