+ 1
Why needed decorators for changing a function?
https://code.sololearn.com/cuFAk9YHrTEY/?ref=app Wrap function can get enother function as parameter and gives The same result
2 Respuestas
+ 2
Here is an example of what a decorator may be useful for:
https://code.sololearn.com/cD09ijlIS6Ev/?ref=app
0
In this example it is not much difference.
But think if your function print_text need parameters, the wrap function doesn't know that.