Python · Level 2 of 5
Decorator
A callable applied to a function or class definition to transform or wrap it.
Decorator syntax does not imply that the original behavior is preserved.
Example
A wrapper measures how long a function call takes.
Listen to the definition and example
Audio transcript
Decorator. A callable applied to a function or class definition to transform or wrap it. Decorator syntax does not imply that the original behavior is preserved. For example: A wrapper measures how long a function call takes.
Explore this concept
Why it matters
This helps you follow Python-based experiments and understand their data structures and tools.
Start with
Related concepts
Quick recall question
Try answering before looking back at the definition.