composition example 1
This commit is contained in:
parent
4d34b769cd
commit
fa416050e0
10
python-temel/composition.py
Normal file
10
python-temel/composition.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
class A:
|
||||
pass
|
||||
|
||||
class B:
|
||||
def __init__(self):
|
||||
self.a = A()
|
||||
pass
|
||||
|
||||
b = B()
|
||||
print(b)
|
9
python-temel/composition.py~
Normal file
9
python-temel/composition.py~
Normal file
|
@ -0,0 +1,9 @@
|
|||
class A:
|
||||
pass
|
||||
|
||||
class B:
|
||||
def __init__(self):
|
||||
self.a = A()
|
||||
pass
|
||||
|
||||
b = B()
|
Loading…
Reference in New Issue
Block a user