Thanks 2QdxY4RzWzUUiLuE for your thoughtful response. I shouldn't have
used the word "expression" since it was going to be taken as a Python
term.

Let me clarify the issue. An optional starred expression (denoted
"[starred_expression]" in the specification of the syntax) is a
natural generalization of an expression list (which is not necessarily
an expression in the Python sense) in the sense that use of the latter
as a special case of the former will lead to intuitively expected
results at all places where the former is allowed. The issue is these
two things seem to be treated unnecessarily differently. Namely, the
syntax requires an expression list at some places (not even
optionally), but does not allow an optional starred expression at the
same places. In such a place, one must turn an optional starred
expression into an expression (in the Python sense) by putting
parentheses around it while parentheses around an expression list are
optional. This difference in treatment seemed
unintuitive to me at least inside brackets.

This means non-experts like me may need to take extra care to stay
safe under possibility of confusion at those places. Must most
non-experts be happy with this in your assessment? A solution would be
simply not to exclude optional starred expressions where an expression
list is required now (since it may be too late now to require a single
expression at those places if that could be better).

Best regards,
Takuo
_______________________________________________
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/UVIJEMNOH75LJIVLFRWQSDTIYO2ZLBKX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to