Python Programming - Decorators - Discussion
Discussion Forum : Decorators - General Questions (Q.No. 21)
21.
What is the purpose of the
@functools.retry
decorator?
Answer: Option
Explanation:
The
@functools.retry
decorator is used to retry a function with a specified delay in case of failure.
@functools.retry(max_retries=3, delay=2)
def unstable_function():
# Function implementation
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