6 ms·
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 ge
by leijurv 3y 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).
- ashton314 3y agoOh fie you’re right and I misread that. Thanks for correcting me. I’ve updated my comment.