class A:
def __init__(self):
self.aa = 2
class B:
def __init__(self):
self.ab = 3
class C(A, B):
pass
c = C()
print(c.aa, c.ab)
class A:
def __init__(self):
super().__init__()
self.aa = 2
class B:
def __init__(self):
super().__init__()
self.ab = 3
class C(A, B):
pass
c = C()
print(c.aa, c.ab)
# Не работает
class A:
def __init__(self):
self.aa = 2
class B:
def __init__(self):
self.ab = 3
class C(A, B):
def __init__(self):
super().__init__()
c = C()
print(c.aa, c.ab)