consequences of not calling object.__init__?

Steven Bethard steven.bethard at
Tue Dec 28 19:41:09 CET 2004

So when I'm writing a class and I define an __init__ method, I sometimes 
haven't called object.__init__, e.g.:

     class C(object):
         def __init__(self, x):
             self.x = x

instead of

     class C(object):
         def __init__(self, x):
             super(C, self).__init__()
             self.x = x

Looking at:
    "The built-in type 'object' has a dummy __new__ and a dummy __init__"

seems to suggest that the super call here is unnecessary.  It's also not 
made in the Super class example from that document:

I'm trying to get in the habit of calling super in all __init__ methods, 
but it seems like it's unnecessary when the only superclass is object.
Assuming that the base class of C doesn't get changed from object, are 
there consequences of not making this call?


More information about the Python-list mailing list