Passing variable-length keyworded arguments list to base class constructor?
Skip Montanaro
skip at mojam.com
Fri Jun 30 11:08:25 EDT 2000
>> Starting with Python 1.6a[12], you can call Parent.__init__(self,
>> **args).
Jerome> And with python 1.5.2?
You must still use apply():
class Child(Parent):
def __init__(self, *args, **kwargs):
apply(Parent.__init__, args, kwargs)
...
--
Skip Montanaro, skip at mojam.com, http://www.mojam.com/, http://www.musi-cal.com/
On Phil Jackson's ability to manage multiple Lakers superstars, Shaquille
O'Neal said: "He's got the rings. I listen to the man with the rings."
More information about the Python-list
mailing list