init example without super
This commit is contained in:
parent
fc0fd91a6c
commit
2fd02739b9
15
python-temel/init.example.without.super.py
Normal file
15
python-temel/init.example.without.super.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user