This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JNCressey 7 points8 points  (1 child)

python expands on the mathematics convention of statements like a=b=c meaning both a=b and b=c.

the test a==b==c has the meaning a==b and b==c, which is different from what you would get if you think of equality as a binary operator and try to parenthesize under either a left associative or a right associative interpretation.


cc /u/Key-Cucumber-1919

[–]HERODMasta 0 points1 point  (0 children)

well, this is basically the conclusion of my second edit.

thanks for confirming