Title: Replace "starred_list" with standard grammar term "expression_list" in for statement documentation · Issue #134026 · python/cpython · GitHub
Open Graph Title: Replace "starred_list" with standard grammar term "expression_list" in for statement documentation · Issue #134026 · python/cpython
X Title: Replace "starred_list" with standard grammar term "expression_list" in for statement documentation · Issue #134026 · python/cpython
Description: Documentation In the compound statements docs, section 8.3 i found: for_stmt ::= "for" target_list "in" starred_list ":" suite ["else" ":" suite] However, starred_list does not appear to be a defined production rule elsewhere in the lang...
Open Graph Description: Documentation In the compound statements docs, section 8.3 i found: for_stmt ::= "for" target_list "in" starred_list ":" suite ["else" ":" suite] However, starred_list does not appear to be a defin...
X Description: Documentation In the compound statements docs, section 8.3 i found: for_stmt ::= "for" target_list "in" starred_list ":" suite ["else" ":" suite] H...
Opengraph URL: https://github.com/python/cpython/issues/134026
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Replace \"starred_list\" with standard grammar term \"expression_list\" in for statement documentation","articleBody":"# Documentation\nIn the [compound statements docs](https://docs.python.org/3/reference/compound_stmts.html#the-for-statement), section 8.3 i found:\n\n\u003e for_stmt ::= \"for\" [target_list](https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-target_list) \"in\" starred_list \":\" [suite](https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-suite)\n [\"else\" \":\" [suite](https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-suite)]\n\nHowever, starred_list does not appear to be a defined production rule elsewhere in the language reference. It seems to act more like a semantic placeholder to indicate that starred_expressions (like *x) are allowed in the iterable.\n\nSince the real grammar uses expression_list — which already includes starred_expression — would it be more consistent and accurate to write this instead?:\n\n\u003e for_stmt ::= \"for\" target_list \"in\" expression_list \":\" suite\n [\"else\" \":\" suite]\n\n\n…and then note in the accompanying text that starred_expression is supported?\nThis might reduce confusion for readers trying to understand or implement the formal grammar.\nCan I work on that?\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-134034\n* gh-134424\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Yash-Vijay29","@type":"Person","name":"Yash-Vijay29"},"datePublished":"2025-05-15T03:58:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/134026/cpython/issues/134026"}
| 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:ce4be56a-d031-b12f-f2f6-cc29bcc19b1d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8702:272909:63559E:816BB2:696B72BB |
| html-safe-nonce | f3ff771998e99455a92124d3909c0b5ca7ee13c629203460cc6eeb43f8a731d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzAyOjI3MjkwOTo2MzU1OUU6ODE2QkIyOjY5NkI3MkJCIiwidmlzaXRvcl9pZCI6IjY0Mjk0NTM5MTUxNjk0NTI3MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 182f942333bc142c48aa0ef10c81932465ce8d1dbc97a050244d29500e011b35 |
| hovercard-subject-tag | issue:3064817882 |
| 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/134026/issue_layout |
| twitter:image | https://opengraph.githubassets.com/476d27b53fb1aec0b632355d2ebdca3dff657c93618286458357edafa4bc7c68/python/cpython/issues/134026 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/476d27b53fb1aec0b632355d2ebdca3dff657c93618286458357edafa4bc7c68/python/cpython/issues/134026 |
| og:image:alt | Documentation In the compound statements docs, section 8.3 i found: for_stmt ::= "for" target_list "in" starred_list ":" suite ["else" ":" suite] However, starred_list does not appear to be a defin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Yash-Vijay29 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width