Sınıf Dekoratörleri örneği 1
This commit is contained in:
parent
b8a3e40136
commit
f36d219480
13
python-temel/sinif.dekoratorleri.py
Normal file
13
python-temel/sinif.dekoratorleri.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
def foo(c):
|
||||
print('foo')
|
||||
return c
|
||||
|
||||
@foo
|
||||
class Sample:
|
||||
def disp(self):
|
||||
print('disp')
|
||||
|
||||
# Sample = foo(Sample)
|
||||
|
||||
s = Sample()
|
||||
s.disp()
|
Loading…
Reference in New Issue
Block a user