@staabm It is useful because if you create conditions that stop iterating the generator then it wont run forever. In other words you get a chance to break the iteration after each yield.