init example without super

This commit is contained in:
Mert Gör 🇹🇷 2023-07-13 14:40:30 +03:00
parent fc0fd91a6c
commit 2fd02739b9
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,15 @@
class A:
def __init__(self):
print('A.__init__')
class B:
def __init__(self):
print('B.__init__')
class C(A, B):
def __init__(self):
A.__init__(self)
B.__init__(self)
print('C.__init__')
c = C()