Q20
What is the purpose of the functools.partial function in decorators?
A.
To create a partial function
AnswerB.
To replace built-in functions
C.
To preserve the original function's metadata
D.
To modify the decorator's behavior
Answer: Option A
Solution
Answer: Option A
Solution:
The functools.partial function is used to create a new function with some arguments pre-filled.