[New-bugs-announce] [issue33390] matmul @ operator precedence

fabrice salvaire report at bugs.python.org
Sun Apr 29 15:49:56 EDT 2018


New submission from fabrice salvaire <fabrice.salvaire at orange.fr>:

I use the new matmul @ operator to implement units, for example 1 at u_s for 1 second ( see alpha state implementation at https://github.com/FabriceSalvaire/PySpice/tree/master/PySpice/Unit ).

It looks cool, but unfortunately 10 at u_s / 2 at u_s is actually interpreted as (10 at u_s / 2)@u_s instead of (10 at u_s) / (2 at u_s) due to operator precedence + <<< - <<< * <<< @ <<< / <<< // <<< % https://docs.python.org/3/reference/expressions.html#operator-precedence

Since Python is widely used for scientific applications, would it be possible to investigate this topic ?

----------
components: Interpreter Core
messages: 315918
nosy: FabriceSalvaire
priority: normal
severity: normal
status: open
title: matmul @ operator precedence
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33390>
_______________________________________


More information about the New-bugs-announce mailing list