__init__() not called automatically

Andrew Koenig ark at acm.org
Thu May 26 09:53:45 EDT 2005


"Sakesun Roykiattisak" <sakesun at boonthavorn.com> wrote in message 
news:mailman.122.1117088782.18027.python-list at python.org...

> Does c++ call base class constructor automatically ??
> If I'm not wrong, in c++ you also have to call base class constructor 
> explicitly.

In C++, if you don't call a base-class constructor (I am saying "a" rather 
than "the" because there might be more than one direct base class), it is 
called automatically with no arguments.  The only case in which you must 
call it explicitly is if it will not accept an empty argument list.





More information about the Python-list mailing list