top | item 37097229

(no title)

leijurv | 2 years ago

No that's not at all how this works. The iterator could "return" a boolean by passing a boolean to "yield". The return value of "yield" just indicates if the generator should continue, or stop because the actual loop has exited (due to break or return).

discuss

order

ashton314|2 years ago

Oh fie you’re right and I misread that. Thanks for correcting me. I’ve updated my comment.