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
Improve documentation for generator.send method #59083
Comments
There's reasonable documentation of the yield statement for most python versions under Section 6: Simple Statements, particularly 6.8 "The Yield Statement" (http://docs.python.org/release/2.7/reference/simple_stmts.html#the-yield-statement) But, there's no mention of the return value of the yield statement, or that the send statement even exists. It's mentioned in passing here under "PEP-342 New Generator Features" (http://docs.python.org/whatsnew/2.5.html#pep-342-new-generator-features) but should be given fuller explanation and cross-linking from the yield statement documentation. It's also mentioned a bit here: http://docs.python.org/howto/functional.html#passing-values-into-a-generator but again, not under the language documentation itself. |
okay, found the documentation I was looking for here: http://docs.python.org/reference/expressions.html#yield-expressions which appears to be copied and pasted and modified version of the docs here: http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt At the very least these should cross-reference each other, but I would guess that the text should be unified, but I'm not sure where. |
Thanks for the report. Are you interested in making a patch? Guidelines are in the devguide. |
The latest docs have a crossrefence at the end of the section: http://docs.python.org/3/reference/simple_stmts.html#grammar-token-yield_stmt I copied the reference to 2.7 docs |
New changeset 7b8c0bf8fcb8 by Andrew Kuchling in branch '2.7': |
Thanks for the patch! |
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: