Python Programming - Decorators - Discussion

Discussion Forum : Decorators - General Questions (Q.No. 3)
3.
What does the @wraps decorator do?
Marks a method as a static method
Provides a way to document and maintain the original function's metadata
Converts a method to a class method
Indicates a method is an instance method
Answer: Option
Explanation:
The @wraps decorator is used to preserve the original metadata of a function, including its name, docstring, and other attributes, when creating a wrapper or decorator.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.