1 > 0 == True -> False

Chris Angelico rosuav at gmail.com
Thu Jan 30 09:18:29 EST 2014


On Fri, Jan 31, 2014 at 1:08 AM, Roy Smith <roy at panix.com> wrote:
> Better than that, do what I do.
>
> 1) Assume that you don't have the full operator precedence table
> memorized and just parenthesize everything.

Or:

1a) Assume that you don't have the full operator precedence table
memorized and just look it up, for whichever language you're working
with today. :)

Usually the precedence table will also remind me of operator chaining,
and whether the integer division and modulo operators are backward
(compare REXX and Python with their % and // operators), and anything
else that needs concern.

ChrisA



More information about the Python-list mailing list