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
{{ message }}
Repository navigation
Replace "starred_list" with standard grammar term "expression_list" in for statement documentation #134026
However, 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.
Since the real grammar uses expression_list — which already includes starred_expression — would it be more consistent and accurate to write this instead?:
…and then note in the accompanying text that starred_expression is supported?
This might reduce confusion for readers trying to understand or implement the formal grammar.
Can I work on that?
Hi, I am willing to work on this issue #134026 Assign me to this issue.
Hi, I actually opened this issue because I noticed the inconsistency and proposed the solution. I'm planning to submit a PR for it shortly. Appreciate the interest, but I’ll be taking this one. I asked in the issues because even i am not sure if its supposed to be changed or whether "starred_list" is correct. Im hoping for someone more experienced to help clarify it. I am new here too and this is my first doc inconsistency, I do not have the power to assign issues as thats only for trusted developers i believe
Activity
sanjai-11 commentedon May 15, 2025
Hi, I am willing to work on this issue #134026
Assign me to this issue.
Yash-Vijay29 commentedon May 15, 2025
Hi, I actually opened this issue because I noticed the inconsistency and proposed the solution. I'm planning to submit a PR for it shortly. Appreciate the interest, but I’ll be taking this one. I asked in the issues because even i am not sure if its supposed to be changed or whether "starred_list" is correct. Im hoping for someone more experienced to help clarify it. I am new here too and this is my first doc inconsistency, I do not have the power to assign issues as thats only for trusted developers i believe
sanjai-11 commentedon May 15, 2025
Got it, Thanks
skirpichev commentedon May 15, 2025
See
cpython/Grammar/python.gram
Lines 715 to 723 in 6df3976
Yash-Vijay29 commentedon May 15, 2025
ah okay. Sorry to bother i must have missed it as i hit "starred" on my ctrl+f in the grammar. Thank you
skirpichev commentedon May 15, 2025
No, you misunderstood. This is a quote from the grammar for your reference. I believe issue is valid.
Yash-Vijay29 commentedon May 15, 2025
oh okay.. its my first issue ever on github so am a bit nervous.
so i change the starred_list into star_expression?
skirpichev commentedon May 15, 2025
I'm not sure about naming. But whatever it will be, you should define the starred_list.
Yash-Vijay29 commentedon May 15, 2025
Oh okay. I will look into doing that
gh-134026: Fix grammar description of for statement (GH-134034)
pythongh-134026: Fix grammar description of for statement (pythonGH-1…
[3.14] gh-134026: Fix grammar description of for statement (GH-134034) (
pythongh-134026: Fix grammar description of for statement (pythonGH-1…
pythongh-134026: Fix grammar description of for statement (pythonGH-1…
pythongh-134026: Fix grammar description of for statement (pythonGH-1…
pythongh-134026: Fix grammar description of for statement (pythonGH-1…