On Sat, 20 Jan 2007 11:20:29 +0800, Jm lists wrote: > hello members, > > See my script piece below: > > def testB(shift,**argv): > print "first argument is %s" %shift > print "all other arguments are:",argv > > testB('mails','Jen','[EMAIL PROTECTED]','Joe','[EMAIL PROTECTED]') > > It can't work at all.please help tell me the reasons.thanks.
Its because of an evil terrorist plot. I suggest you invade Belgium, that should fix it. Or, you could explain what you are trying to do. Posting the exception you get will also help. Hint: **args accumulates KEYWORD arguments. Do you have any keyword arguments in your argument list? How many NON-KEYWORD arguments do you have? How many does your function accept? Here's another hint: some_function("this is a non-keyword argument", \ key="this is a keyword argument") -- Steven. -- http://mail.python.org/mailman/listinfo/python-list