Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 71)
71.
How does the
generator.throw()
method differ from the generator.close()
method?
Answer: Option
Explanation:
generator.throw()
raises a specific exception in the generator, while generator.close()
terminates the generator by raising a GeneratorExit
exception.
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