0

Can anybody kindly explain python decorators? I'm completely lost 😢

3rd Jul 2022, 5:45 AM
Junior Coder
Junior Coder - avatar
2 ответов
+ 6
It's a big concept and cannot not be explained easily. Try the 'Python Intermediate' course, In decorator chapter there are many good comments explaining the concept + resources that might help you.
3rd Jul 2022, 8:20 AM
Sandeep
Sandeep - avatar
+ 2
"Decorator" or "Wrapper" is a very old design pattern that has evolved from the heroic ages of object-oriented programming. https://refactoring.guru/design-patterns/decorator Essentially it is a way to add new functionality to an existing object or modify its behavior, without actually changing the original. The decorators in Python implement this pattern in a quite unique manner, by functional closures.
4th Jul 2022, 5:56 PM
Tibor Santa
Tibor Santa - avatar