class 2
This commit is contained in:
parent
2f23e77508
commit
1a0db0282c
12
python-temel/class.2.py
Normal file
12
python-temel/class.2.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
class Sample:
|
||||
def foo(self):
|
||||
print('foo')
|
||||
|
||||
def b(self):
|
||||
print('bar')
|
||||
|
||||
Sample.bar = b
|
||||
|
||||
s = Sample()
|
||||
s.foo()
|
||||
s.bar()
|
Loading…
Reference in New Issue
Block a user