[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Operator precedence problem

On Mon, Jun 6, 2016, at 13:07, Steven D'Aprano wrote:
> Blimey, you're right. I always thought `and` and `or` had the same
> precedence. And now that I know better, I have no doubt that I will
> forget
> it again.

A good way to remember it is that "and" is analogous to multiplication,
and "or" is analogous to addition. Which is, I assume, _why_ they have
the same precedence. (why ^ is between | and &, though, is a mystery to