From my knowledge the decorators are wrapper used to modify behavior of a function mainly
by addibg code before and/or after the decorated function or modify the arguments passed
to it. They contain a inner funtion that wrap around the decorated function and can be executed
before or after the decorated function is called
The purpose of the script is to provide a simple example of how decorators work and to make their understanding easier.
This a simple example with comments that follow all exeution steps in the first part.
The second part is exactly the same script but using "@" to define hello_decorator(func) as a decorator to
function_to_be_used()
decorator_demo.py
Alin Rizea
https://www.linkedin.com/in/alin-rizea-b10368104/