Feature or enhancement
Proposal:
I've been implementing a Python runtime for a couple of months and I've been meaning to ask about something I noticed in the grammar.
Why do we use:
assignment:
| NAME ':' expression ['=' annotated_rhs ]
| ('(' single_target ')'
| single_subscript_attribute_target) ':' expression ['=' annotated_rhs ]
| (star_targets '=' )+ (yield_expr | star_expressions) !'=' [TYPE_COMMENT]
| single_target augassign ~ (yield_expr | star_expressions)
annotated_rhs: yield_expr | star_expressions
Instead of:
assignment:
| NAME ':' expression ['=' annotated_rhs ]
| ('(' single_target ')'
| single_subscript_attribute_target) ':' expression ['=' annotated_rhs ]
| (star_targets '=' )+ (annotated_rhs) !'=' [TYPE_COMMENT]
| single_target augassign ~ (annotated_rhs)
annotated_rhs: yield_expr | star_expressions
Forgive my ignorance when it comes to grammars but are these not the same thing?
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Feature or enhancement
Proposal:
I've been implementing a Python runtime for a couple of months and I've been meaning to ask about something I noticed in the grammar.
Why do we use:
Instead of:
Forgive my ignorance when it comes to grammars but are these not the same thing?
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
annotated_rhsin the Grammar #117004