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