def __init__(self): for base in self__class__.__bases__: try: base.__init__(self) except AttributeError: pass