On 2021-08-22 11:51, Matsuoka Takuo wrote:
Dear developers,

According to the Language Reference, a starred expression is defined
by

   starred_expression ::=  expression | (starred_item ",")* [starred_item]

https://docs.python.org/3/reference/expressions.html#expression-lists

However, in view of the definition of an assignment statement

   assignment_stmt ::=  (target_list "=")+ (starred_expression |
yield_expression)

https://docs.python.org/3/reference/simple_stmts.html#assignment-statements

I believe the correct definition actually used is

   starred_expression ::=  expression | (starred_item ",")+ [starred_item]

(that is, use "+" instead of "*").

Should it be fixed?

The existing definition states that 'starred_expression' could be empty, so it does look suspicious.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/TNRC3ZO5PY7AFDGMFSOND6JKBDBXJKW7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to