-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Open
Labels
Description
Documentation
6.7. Binary arithmetic operations shows the grammar rule
m_expr ::= u_expr | m_expr "*" u_expr | m_expr "@" m_expr |
m_expr "//" u_expr | m_expr "/" u_expr |
m_expr "%" u_expr
in which all operators except @
for matmul are left-associative (meaning, a*b*c
parses as m_expr a*b
and u_expr c
) while @
is ambiguous: Does a@b@c
parse as m_expr a@b
and m_expr c
or as m_expr a
and m_expr b@c
?
According to PEP 465, @
should have the same associativity as *
. Should this grammar rule should reflect that by saying m_expr "@" u_expr
, that is, with the right-hand side changed from m_expr
to u_expr
?
Linked PRs
StanFromIreland
Metadata
Metadata
Assignees
Labels
Projects
Status
Todo