Python language

Decorator

A callable that takes a function and returns a replacement, applied with @ syntax.

Why interviewers ask about it

Always mention functools.wraps - without it the decorated function loses its name and docstring, breaking introspection and documentation tooling.

This term is part of the free Python Full-Stack interview preparation module - browse the full glossary for every definition.