What is a Python decorator?
spaceto flip
A function that wraps another function to add behavior. @decorator syntax is sugar for func = decorator(func). Common uses: logging, timing, auth checks, retry logic, caching (@functools.lru_cache). Decorators can take arguments too: @retry(max_attempts=3).