Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 76)
76.
What happens if the
generator.throw(ValueError)
method is called without specifying an exception value?
Answer: Option
Explanation:
Calling
generator.throw(ValueError)
without specifying an exception value raises a TypeError
, as the exception value is mandatory.
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