ডেকোরেটর
ডেকোরেটর
>>> def my_decorator(func):
... def decorate():
... print("--------------")
... func()
... print("--------------")
... return decorate
...
>>> def print_raw():
... print("Clear Text")
...
>>> decorated_function = my_decorator(print_raw)
>>> decorated_function()
--------------
Clear Text
--------------@decorator
Last updated