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

Nathaniel Smith njs at pobox.com
Tue Mar 18 15:18:59 EDT 2014


On 18 Mar 2014 17:32, "Christophe Bal" <projetmbc at gmail.com> wrote:
>
> This is a different situation because / is indeed an hidden
multiplication : a/b = a*inv(b). The same is true for + and - :
a-b=a+opp(b). What I'm saying is that these operations * and / are indeed
of the very same j-kind.
>
> This is not the same for * and @.

// (floordiv) isn't equivalent to a multiplication, but it is also at the
same level. << and >> aren't inverses, but they are at the same level. 'in'
and 'is' are not even the same type (they have totally different
requirements on their right argument) but they are at the same level.
Whatever choice we make needs to be something we can justify, and our
justification should probably not imply that all of python's other
operators are wrong ;-).

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140318/a6e906d1/attachment.html>


More information about the NumPy-Discussion mailing list