dekoratör örneği 1

This commit is contained in:
Mert Gör ☭ 2023-08-04 17:07:33 +03:00
parent 8ebca951d7
commit ef072b5018
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
def foo(f):
print('foo')
return f
@foo
def bar():
print('bar')
# eşdeğeri -> bar = foo(bar)
bar()

View File

@ -0,0 +1,11 @@
def foo():
print('foo')
return f
@foo
def bar():
print('bar')
# eşdeğeri -> bar = foo(bar)
bar()