This is a pretty cool recipe.
The precedence is determined by the overridden operator. In this case the "|" operator has low precedence.¹ For a high precedence operator, override "%" with __mod__ and __rmod__:
4 |add| 5 %mul% 6 |add| 7 # mul happens before add
¹ https://docs.python.org/3/reference/expressions.html#operato...