[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-18 Thread Greg Ewing
Greg Ewing added the comment: bryan.koch wrote: > It would be awesome if invoking a generator above would throw a > SyntaxError iff it contained a return and it wasn't invoked through `yield > from`. Why do you care about that so much? There's nothing to stop you from ignoring t

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-17 Thread Greg Ewing
Greg Ewing added the comment: There is no bug here; the current implementation is working as intended. The word "yields" in the quoted section of the PEP indeed refers to the "yield" keyword and nothing else. Possibly that could be clarified, but I believe it's alrea