You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When yield from has come (Python 3.3+), it becomes possible to use return (with values) inside generators. The essence of such behavior becomes clear from PEP380. However, even being explainable from PEPs, this issue produces very unintuitive behavior.
Probably, this example could be included to this project. I can prepare a pull request for this.
The text was updated successfully, but these errors were encountered:
Let consider the following function:
What would be expected behavior, if we called
Instead of exected output
["A string..."]
, we would get an empty list[]
!The same behaviour is true, if we replace
yield from
with a loop, e.g.When
yield from
has come (Python 3.3+), it becomes possible to use return (with values) inside generators. The essence of such behavior becomes clear from PEP380. However, even being explainable from PEPs, this issue produces very unintuitive behavior.Probably, this example could be included to this project. I can prepare a pull request for this.
The text was updated successfully, but these errors were encountered: