On 2016-06-06, Marko Rauhamaa <ma...@pacujo.net> wrote:
> Random832 <random...@fastmail.com>:
>> Sure, it's obvious to _me_ that << and >> have higher precedence than &
>> and |, and that "and" has a higher precedence than "or", but can I
>> assume the other people know this?
>
> No need to assume. Just read the spec:

The spec tells you the overlap between the set of all people who will
ever read your code and the set of people who have memorised the
entire list of operator precedences in the spec?

That's one impressive spec.

> You *can* assume other people have read the spec. Even more importantly,
> you can assume the Python interpreter complies with the spec.

Obviously the latter is true (or at least, it's true except when it's
false). The former however is not true. You should put brackets around
expressions when it's at all unclear what the meaning is. You could
think of them a bit like "active comments" I suppose.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to