Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 73)
73.
How does the
generator.throw(GeneratorExit) method differ from generator.close()?
Answer: Option
Explanation:
generator.throw(GeneratorExit) raises a GeneratorExit exception in the generator, indicating that the generator should be closed. generator.close() terminates the generator without raising an 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