[Tutor] Using superclass __init__ method

Jan Eden lists at janeden.org
Thu Sep 22 15:27:32 CEST 2005


I just noticed that in the following environment:

class Base:
    def __init__(self):

class Child(Base):
the following statement:

child = Child()

would automatically execute the superclass __init__ method. This is exactly what I was looking for - but in the Cookbook, I found several suggestions on how to actively force the invocation of the superclass __init__.

Is this behvaiour documented?


There are 10 kinds of people:  those who understand binary, and those who don't

More information about the Tutor mailing list