According to answer to this question, yield break in C# is equivalent to return in Python. In the normal case, return indeed stops a gener
yield break
return
def generate_nothing(): return yield