Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 73)
73.
What is the purpose of the functools.wraps decorator?
To create wrapper functions.
To wrap an iterable.
To preserve the original metadata of a decorated function.
To wrap a class method.
Answer: Option
Explanation:
The functools.wraps decorator in Python is used to preserve the original metadata of a decorated function, such as its name and docstring.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.