__init__() not called automatically
Sakesun Roykiattisak
sakesun at boonthavorn.com
Thu May 26 02:25:05 EDT 2005
Does c++ call base class constructor automatically ??
If I'm not wrong, in c++ you also have to call base class constructor
explicitly.
Python just do not enforce the rule. You can leave it as desire.
BTW, I've once been an C++ expert. Knowing python kill that skill.
However, I'm not regret. I have c++ compiler installed, but I don't even
bother validate my last paragraph assertion. Too disgusting. ;)
Sriek wrote:
>Tim pointed out rightly that i missed out the most crucial part of my
>question.
>i should have said that __init__() is not called automatically only for
>the inheritance hierarchy. we must explicitly call all the base class
>__init__() fuctions explicitly.
> i wanted a reason for that.
>Thanks Tim.
>
>
More information about the Python-list
mailing list