class Foo(X, Y, Z): def __init__(self): for base in self__class__.__bases__: try: base.__init__(self) except AttributeError: pass