Oleg Broytmann doesn't understand my problem

Greg Ewing see at my.signature
Fri Jun 1 01:41:24 EDT 2001


Laura Creighton wrote:
> 
> I don't just have a dictionary, I have arguments and a dictionary. 
> I need to be able to pass both a=b parameters AND a dictionary.

You can supply explicit arguments along with
the * and/or ** argument in 2.0:

  foo(1, 2, "buckle", x="my shoe", *a_list, **a_dict)

It's exactly what you need for passing arguments
to an inherited __init__ method. (This is not a
coincidence -- that's what the syntax was mainly
designed for!)

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list