What is a decorator in Python?
Correct answer
B. A function that wraps another function to extend its behaviour
6 views
B. A function that wraps another function to extend its behaviour
6 views
Decorators take a callable and return a modified callable, applied with @.
Asked in: Python Interview Advanced Python
https://docs.python.org/3/library/index.htmlNot sure why the answer is B? Ask here and get an explanation.