On this page
article
Interview Q&A #103
Web & Backend interview question #13.
Category: Web & Backend
Question
[Web & Backend] Question #13: What are decorators?
Answer
Functions that wrap other functions to extend behavior without modifying the original. Syntax: @decorator above def.
Expand your answer with examples from your projects and link to Interview Prep.
Follow-Up Questions
- Can you explain a trade-off involved?
- How would you test this in production?
- What could go wrong at scale?