Title: Inaccurate terminology in the “Generator functions” section · Issue #156837 · python/cpython · GitHub
Open Graph Title: Inaccurate terminology in the “Generator functions” section · Issue #156837 · python/cpython
X Title: Inaccurate terminology in the “Generator functions” section · Issue #156837 · python/cpython
Description: Documentation The wording in section 3.2.8.3 is potentially misleading: “A function or method which uses the yield statement … is called a generator function.” and later: “the function … provides a value using the yield statement.” yield...
Open Graph Description: Documentation The wording in section 3.2.8.3 is potentially misleading: “A function or method which uses the yield statement … is called a generator function.” and later: “the function … provides a...
X Description: Documentation The wording in section 3.2.8.3 is potentially misleading: “A function or method which uses the yield statement … is called a generator function.” and later: “the function … provides a...
Opengraph URL: https://github.com/python/cpython/issues/156837
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inaccurate terminology in the “Generator functions” section","articleBody":"### Documentation\n\nThe wording in section 3.2.8.3 is potentially misleading:\n\n> “A function or method which uses the yield statement … is called a generator function.”\n\n\nand later:\n\n> “the function … provides a value using the yield statement.”\n\n\nyield is not necessarily a yield statement (yield_stmt in the grammar). It can also occur as part of an expression, for example:\n\n```\ndef f():\n x = yield 5\n\n```\nHere yield 5 is a yield expression, but f is still a generator function.\n\nIt may be more accurate to refer to a function that contains a yield expression rather than one that “uses the yield statement”.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-156863\n* gh-157218\n* gh-157219\n* gh-157220\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/dluschan","@type":"Person","name":"dluschan"},"datePublished":"2026-09-02T14:57:17Z","url":"https://github.com/python/cpython/issues/156837"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:40ac361c-f56c-3761-828b-cc11b9501abf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85C0:39FDE1:1DF726:25C25F:6B01F255 |
| html-safe-nonce | 51e9dfaf961649d949e1ffa853b90e017086905956ada1c58da0b7c64c38bee3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUMwOjM5RkRFMToxREY3MjY6MjVDMjVGOjZCMDFGMjU1IiwidmlzaXRvcl9pZCI6IjY1NzcwMTQ3NTM2NzAwNjY3NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f3d03cbee46a456116b87e9681115d2fa86266b7b2f5651099829bb741986c73 |
| hovercard-subject-tag | issue:5325546509 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/156837/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9d966721264847ac30bc7dbbbbe82dab9073975fc24e54c0624938245bbc4261/python/cpython/issues/156837 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9d966721264847ac30bc7dbbbbe82dab9073975fc24e54c0624938245bbc4261/python/cpython/issues/156837 |
| og:image:alt | Documentation The wording in section 3.2.8.3 is potentially misleading: “A function or method which uses the yield statement … is called a generator function.” and later: “the function … provides a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dluschan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width