Skip to content

gh-141984: Split Parenthesized form docs into "groups" and "tuple displays"#144964

Open
encukou wants to merge 4 commits intopython:mainfrom
encukou:expressions-parenthesized
Open

gh-141984: Split Parenthesized form docs into "groups" and "tuple displays"#144964
encukou wants to merge 4 commits intopython:mainfrom
encukou:expressions-parenthesized

Conversation

@encukou
Copy link
Member

@encukou encukou commented Feb 18, 2026

Split up and reword the sections for group (except yield) and tuple rules in python.gram.
As is tradition in these PRs, simple/usual syntax comes first, followed by more complex and obscure cases, finishing up with the formal grammar.
For tuple displays, this meant putting tuples with 2+ elements first, followed by one-element and empty ones. I think the rules are much easier to follow this way.

This also fixes the formal grammar, which previously didn't allow commas in the parentheses.


📚 Documentation preview 📚: https://cpython-previews--144964.org.readthedocs.build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant

Comments