Re: __init__() not called automatically
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: __init__() not called automatically

From: Andrew Koenig <ark@acm.org>
Date: Thu May 26 2005 - 15:53:45 CEST

"Sakesun Roykiattisak" <sakesun@boonthavorn.com> wrote in message
news:mailman.122.1117088782.18027.python-list@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.
Received on Thu Sep 29 16:14:19 2005