Files
Python-tutorial/decorators/decorator.py
Hizenberg469 00197cf3c5 decorators
2025-03-19 15:46:10 +05:30

20 lines
280 B
Python

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