a.init example
This commit is contained in:
parent
d67c54e875
commit
2a2ed48501
1 changed files with 9 additions and 0 deletions
9
python-temel/a.init.py
Normal file
9
python-temel/a.init.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
class A:
|
||||
def __init__(self):
|
||||
print('A.__init__')
|
||||
|
||||
class B(A):
|
||||
pass
|
||||
|
||||
print(B.__mro__) # (<class '__main__.B'>, <class '__main__.A'>, <class 'object'>)
|
||||
b = B() # A.__init__ çağrılır
|
Loading…
Reference in a new issue