I have code like this:
class A(object):
def __init__(self):
self.a = 1
class B(A):
def __init__(self):
self.b = 2
super(self.__class__, self).__init__()
class C(B):
def __init__(self):
self.c = 3
super(self.__class__, self).__init__()
Instantiating B works as expected but instantiating C recursed infinitely and causes a stack overflow. How can I solve this?