What is a decorator?
A decorator wraps another callable to add behavior without changing the original function body.
- Starts with a callable
- Usually returns a wrapper
- Common for logging, auth, caching
What is a decorator?
A decorator wraps another callable to add behavior without changing the original function body.
A decorator wraps another callable to add behavior without changing the original function body.
What is a decorator?