Skip to content
Sharp

Iterators and Generators · interview question

If yield and custom generators fails in production, what handling philosophy is strongest?

Multiple choiceMediumchapter-8-curatedpremiumiterators-and-generatorsyield-and-custom-generators
Choose one answer
Answer and explanation

Correct answer

B. Fail in a way that preserves the reason, keeps the boundary honest, and avoids hiding the real source of the problem.

Why

Reliable systems preserve context. Silent failure makes the next debugging round slower and riskier.

Test yourself on Iterators and Generators

A free test with instant, explained results. No account needed.

Start free test
All Iterators and Generators questions →