Sınıf Dekoratörleri örneği 1

This commit is contained in:
Mert Gör ☭ 2023-08-06 17:01:23 +03:00
parent b8a3e40136
commit f36d219480
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
1 changed files with 13 additions and 0 deletions

View 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()