Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 47)
47.
How does the
generator.throw(RuntimeError, "message")
method affect a running generator?
Answer: Option
Explanation:
generator.throw(RuntimeError, "message")
raises a custom exception of type RuntimeError
with the specified message inside the generator.
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