I have a code as follows:
class A(): def something(): #Do something class B(A): def something(): super(B, self).something() #Do something class C(B): def something(): if VeryRareSpecificCase: super(super(C,self)).something() else: super(C, self).something() #Do something However, it raises the error TypeError: must be type, not super.
super(super(C, self))to refer to? If the answer issuper(B, self), then you aren't usingsupercorrectly; you should just be hardcoding the class references.