a.init example

This commit is contained in:
Mert Gör 🇹🇷 2023-07-13 16:09:10 +03:00
parent d67c54e875
commit 2a2ed48501
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

9
python-temel/a.init.py Normal file
View 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