super() fails with error: TypeError “argument 1 must be type, not classobj” when parent does not inherit from object

Your problem is that class B is not declared as a “new-style” class. Change it like so: and it will work. super() and all subclass/superclass stuff only works with new-style classes. I recommend you get in the habit of always typing that (object) on any class definition to make sure it is a new-style class. Old-style classes (also … Read more

super() in Java

super() calls the parent constructor with no arguments. It can be used also with arguments. I.e. super(argument1) and it will call the constructor that accepts 1 parameter of the type of argument1 (if exists). Also it can be used to call methods from the parent. I.e. super.aMethod() More info and tutorial here

What does ‘super’ do in Python? – difference between super().__init__() and explicit superclass __init__()

The benefits of super() in single-inheritance are minimal — mostly, you don’t have to hard-code the name of the base class into every method that uses its parent methods. However, it’s almost impossible to use multiple-inheritance without super(). This includes common idioms like mixins, interfaces, abstract classes, etc. This extends to code that later extends yours. If somebody … Read more

Understanding Python super() with __init__() methods [duplicate]

super() lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. See the standard docs on super if you haven’t already. Note that the syntax changed in Python 3.0: you can just say super().__init__() instead of super(ChildB, self).__init__() which IMO is quite a bit nicer. The … Read more