Which of the 4 ways to call super() in Python 3 to use?
Let’s use the following classes for demonstration: class A(object): def m(self): print(‘m’) class B(A): pass Unbound super object doesn’t dispatch attribute access to class, you have to use descriptor protocol: >>> super(B).m Traceback (most recent call last): File “<stdin>”, line 1, in <module> AttributeError: ‘super’ object has no attribute ‘m’ >>> super(B).__get__(B(), B) <super: <class … Read more