On 2/6/2020 2:26 PM, Mark Shannon wrote:

In the python grammar, an 'expression' is a 'starred_item' but a 'starred_item' need not be an expression.

starred_item ::=  expression | "*" or_expr
expression ::=  conditional_expression | lambda_expr
conditional_expression ::=  or_test ["if" or_test "else" expression]

'*a' is a 'starred_item' but not an 'expression'.

I don't know where you got that grammar from, but not GitHub
https://github.com/python/cpython/blob/master/Grammar/Grammar#L142

From the human readable docs

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

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

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YYVDKK2FODTHFXN26LEUE2DJTOXGYWXB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to