New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use |yield from| in stdlib #60324
Comments
3.3 is in bugfix mode only now. So, targeting 3.4. I am neutral to this change. Showing use of new language idioms is nice, but merging patches to 3.3 and 3.4 would be more difficult. |
Thanks for the patch. I think that seeing as we've already done a bunch, there's little reason not to do more. |
Berker, could you possibly submit a Contributor Agreement Form? Details at http://www.python.org/psf/contrib/ Does your patch take care of all "yield" in the stdlib? |
How are people finding these uses? Grepping around for yield and seeing if it is in a 'for' loop? Or are people doing something more detailed like an AST walk of every module in the stdlib looking for some pattern? |
Personally I ran the following command: find -type f -name '*.py' -exec egrep -n -A1 '\bfor\b.*\bin\b' '{}' + | egrep -v 'yield +from' | egrep -B1 'yield +\w+(, *\w+)* *(#|$)' I deliberately missed tests and lib2to3, because that's where the changes required more attention. Berker Peksag found a few missed, these changes LGTM. |
New changeset 7d8868c13b95 by Andrew Svetlov in branch 'default': |
Thanks, Berker. |
Jesús, I just emailed the contributor agreement.
I found another one -- thanks to Serhiy's command. Patch attached. |
New changeset 70d49694786c by Andrew Svetlov in branch 'default': |
Fixed, thanks. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: