[Numpy-discussion] [help needed] associativity and precedence of '@'

Charles R Harris charlesr.harris at gmail.com
Sat Mar 15 10:49:26 EDT 2014


I favor the weak right option.

1) Giving '*' higher precedence than `@` makes it easier, to my mind, to
parse out what is going to happen: all the element-wise multiplications,
followed by the matrix operations. I'd probably still use parenthesis for
clarity.

2) Right associative has the advantage of efficiency in many common use
cases, plus I tend to read matrix expressions from right to left.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140315/2eef91ee/attachment.html>


More information about the NumPy-Discussion mailing list