init example with super

This commit is contained in:
Mert Gör ☭ 2023-07-13 14:35:05 +03:00
parent a72f7124b4
commit fc0fd91a6c
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
1 changed files with 14 additions and 0 deletions

View File

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