Please be informed that a decorator Python in object-oriented programming, is a design pattern that enables the behavior to be added to an existent object dynamically. The decorator pattern can be applied to extend (decorate) the functionality of a particular object at run-time, separately from other cases of the same class, provided some preparation is done at design time.
Whereas if we talk about decorators in Python, they are not an implementation of the decorator pattern. The decorator pattern is a design pattern applied in statically typed object-oriented programming languages to provide the functionality to be added to objects at run time; Python decorators add functionality to functions and methods at definition time and therefore are a higher-level construct than decorator-pattern classes.
Therefore in Python, a decorator is any callable Python object that is applied to change a function, method, or class definition.