On Sun, Jul 1, 2012 at 2:07 PM, rusi <rustompm...@gmail.com> wrote: > Kernighan and Ritchie admit they made a design mistake with their > operator precedences: > > http://en.wikipedia.org/wiki/C_%28programming_language%29#Criticism >
The examples given there have nothing to do with the chaining of comparisons and how it's to be interpreted. Yes, "x & 1 == 0" is evaluated oddly. Doesn't affect "x == 1 == y". Python's interpretation is more algebraic than C's. That doesn't mean that C is wrong and Python is right, nor does it mean the converse. ChrisA -- http://mail.python.org/mailman/listinfo/python-list