Decorators Are Just Functions. Here Is Proof.

The @ symbol in Python is syntax sugar. That is the entire secret to understanding decorators. Strip away the syntax sugar and trace exactly what Python does with the @ symbol.

When you write this:

@my_decorator

def my_function():