Python Programming - Decorators - Discussion
Discussion Forum : Decorators - General Questions (Q.No. 11)
11.
What is the primary purpose of the
@contextmanager
decorator?
Answer: Option
Explanation:
The
@contextmanager
decorator is used to create a context manager, allowing resource allocation and deallocation to be managed using the with
statement.
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