[Tutor] *args, **kargs as arguments

O.R.Senthil Kumaran orsenthil at gmail.com
Sun Nov 11 01:54:59 CET 2007


> 
> > class Derived(BaseClass):
> >         def __init__(self, *args, **kargs):
> >                 BaseClass.__init__(self, *args, **kargs)
> >
> > - *args, **kargs passes a tuple and a dictionary to the BaseClass constructor.
> >
> > My assumption is the BaseClass will always have a constructor that will
> > be receiving the tuple and a dictionary. Am I right?
> 
> not quite.  you're on the right track though. a couple of thoughts.


Thank you Wesley for the examples and the explaination.
And thanks Jeff for your explaination. It helped me clarify my doubts. :-)
Really helpful.

-- 
O.R.Senthil Kumaran
http://uthcode.sarovar.org


More information about the Tutor mailing list