Taban ve Türemiş 3

This commit is contained in:
Mert Gör ☭ 2023-07-02 16:20:37 +03:00
parent 6ac4516fe4
commit 015db3e88e
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
class A:
def foo(self):
print('A.foo')
class B(A):
def foo(self):
print('B.foo')
b = B()
A.foo(b) # A.foo çağrılır
super(B, b).foo() # A.foo çağrılır