Python Programming - Decorators - Discussion
Discussion Forum : Decorators - General Questions (Q.No. 8)
8.
Which decorator is used to ensure that a function is only executed after a certain condition is met?
Answer: Option
Explanation:
There is no built-in
@functools.singledispatchmethod
decorator in Python, but a custom decorator can be created to execute a function based on a specified condition.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers