consequences of not calling object.__init__?

Steven Bethard steven.bethard at gmail.com
Tue Dec 28 14:24:16 EST 2004


John Lenton wrote:
> in the code that follows, instances of E haven't been through D's
> rigorous initiation process
> 
> .    class C(object):
> .        def __init__(self):
> .            print "C"
> .
> .    class D(object):
> .        def __init__(self):
> .            print "D"
> .            super(D, self).__init__()
> .
> .    class E(C, D):
> .        def __init__(self):
> .            print "E"
> .            super(E, self).__init__()
> 

Ahh, there's the example I was looking for. =)

Thanks!

Steve



More information about the Python-list mailing list