On 21 Dec 2006 14:51:15 -0800, Sandra-24 <[EMAIL PROTECTED]> wrote: >I've always wondered why I can't do: > >def foo(a,b,c): > return a,b,c > >args = range(2) >foo(*args, c = 2) > >When you can do: > >foo(*args, **{'c':2})
You just need to turn things around: >>> def foo(a, b, c): ... return a, b, c ... >>> args = range(2) >>> foo(c=2, *args) (0, 1, 2) >>> Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list