This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong definition of a starred expression in the Language Reference
Type: behavior Stage:
Components: Documentation Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Takuo Matsuoka, docs@python, eric.araujo
Priority: normal Keywords:

Created on 2021-08-23 13:32 by Takuo Matsuoka, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg400136 - (view) Author: Takuo Matsuoka (Takuo Matsuoka) Date: 2021-08-23 13:32
Being unaware of the processes here, I have posted the issue to the python-idea mailing list. Please refer to it.

https://mail.python.org/archives/list/python-ideas@python.org/message/TCWYZIIRZWIR7CDJWDAUBCAMU2CBFB3Y/

Thank you.
msg400440 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-08-27 20:02
Hello!  For future tickets, please include all relevant info here rather that only links.

Linked message is:



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?
msg400441 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-08-27 20:04
This should answer questions about the processes: https://devguide.python.org/tracker/
msg400686 - (view) Author: Takuo Matsuoka (Takuo Matsuoka) Date: 2021-08-31 04:14
Thanks Éric Araujo, for the information. Actually, I sought for a
similar issue here in the tracker, but didn't find one filed, so this
report appears to be unique.
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89146
2021-08-31 04:14:50Takuo Matsuokasetmessages: + msg400686
2021-08-27 20:04:36eric.araujosetmessages: + msg400441
2021-08-27 20:02:37eric.araujosetnosy: + eric.araujo
messages: + msg400440
2021-08-23 13:32:50Takuo Matsuokacreate