Python docs [was: function with a state]

Terry Reedy tjreedy at udel.edu
Thu Mar 24 19:02:22 EST 2005


>Comparisons can be chained, and is evaluated from left to right. For
>example, x < y <= z is equivalent to (x < y) <= z.

The proposed 'correction' above is incorrect and should be ignored.

>>> x,y,z = 2,3,1
>>> x<y<=z
0
>>> (x<y)<=z
1

Terry J. Reedy







More information about the Python-list mailing list