decorators

This commit is contained in:
Hizenberg469
2025-03-19 15:46:10 +05:30
parent 98558bab53
commit 00197cf3c5
5 changed files with 628 additions and 12 deletions

20
decorators/decorator.py Normal file
View File

@@ -0,0 +1,20 @@
#decorator
def my_decorator(func):
def wrap_func():
print('************')
func()
print('************')
return wrap_func
@my_decorator
def hello():
print('hellllooooooooooo')
@my_decorator
def bye():
print('see ya letter')
hello()
bye()