By definition, a decorator is a function that takes another function as its input, with the purpose of implicitly extending its behavior without explicitly modifying it. As a Python developer you may have seen such decorators when dealing with classes, as shown in the example below. class Dog: β¦