Python Programming - Decorators - Discussion

Discussion Forum : Decorators - General Questions (Q.No. 9)
9.
How can you create a decorator that takes arguments?
Using the @staticmethod decorator
Using the @functools.wraps decorator
By defining a higher-order function that returns the actual decorator
By using the @classmethod decorator
Answer: Option
Explanation:
To create a decorator that takes arguments, you can define a higher-order function that returns the actual decorator based on the provided arguments.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.