+ 2
decorator
what is the use of decorater?i don’t understand it.
4 ответов
+ 3
A decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure.
If you don't want to change or modify directly the Function, you can just use decorators to modify it without changing its code structure.
+ 1
To add features on a existing function without modifying it
+ 1
add functionality without modify, both functions or classes
- 1
please answer