mirror of
https://github.com/Hizenberg469/Python-tutorial.git
synced 2026-04-19 15:12:22 +03:00
20 lines
280 B
Python
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() |