Hacker News new | ask | show | jobs
by leijurv 1035 days 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).
1 comments

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