Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace "starred_list" with standard grammar term "expression_list" in for statement documentation #134026

Closed
Labels
docsDocumentation in the Doc dir
@Yash-Vijay29

Description

@Yash-Vijay29

Documentation

In thecompound 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 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?:

for_stmt ::= "for" target_list "in" expression_list ":" suite
["else" ":" suite]

…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?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp