calling the function police

Jp Calderone exarkun at intarweb.us
Mon Dec 22 09:22:27 EST 2003


On Sun, Dec 21, 2003 at 10:32:25PM -0800, EP wrote:
> Oops. copied wrong:
> 
> >>>> result=function1(first=parameter, end='noodles','Jim Beam', 'Poker')
> 
> strike that.
> 
> It was actually:
> 
> >>> result=function1('Jim Beam', 'Poker',first=parameter,end='noodles')
> 
> and got this error:
> 
> >TypeError: function1() got multiple values for keyword argument 'first'
> 

   'Jim Beam' is passed as an argument for "first".  'Poker' as an argument
for "end".  Then, parameter is passed as an argument for "first", and
'noodles' as an argument for "end".  No arguments are passed for the
*argument (I forget what it was called in your example).

  In general, the first argument matches up with the first parameter, the
second with the second, and so forth.

  Does this make sense now?

  Jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20031222/727c77b1/attachment.sig>


More information about the Python-list mailing list