Re: __init__() not called automatically

2005-05-26 Thread Sriek
maybe like this: we can have the default behaviour as calling the default constructor ( with default arguements where required ). Along with this, keep the option open to call constructors explicitly. My only contention is that there may be a greater reason for this rule in the Python Language. t

Re: __init__() not called automatically

2005-05-26 Thread Sriek
if i understand C++ right, in c++ you CAN explicitly call the base constructor ( for eg. if it requires some particular arguements ), but, the compiler automatically has to call the base class constructor ( see the rules for constructing an object of the derived classes ). But, yes, C++ can be too

Re: __init__() not called automatically

2005-05-25 Thread Sriek
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. --

__init__() not called automatically

2005-05-25 Thread Sriek
hi, i come from a c++ background. i ws happy to find myself on quite familiar grounds with Python. But, what surprised me was the fact that the __init__(), which is said to be the equivlent of the constructor in c++, is not automatically called. I'm sure there must be ample reason for this. I would