130. Chained comparisons point one way (2026-11-21)
- Decision.
a < b <= ckeeps Python's meaning (each operand evaluated once, links joined byand), as implemented today, but only for chains in one direction: all of</<=or all of>/>=. Mixed directions (a < b > c) and chains containing==/!=become a compile error suggestingand. - Why.
0 <= i < j <= nreads like the statement and costs one comparison per link; mixed chains are almost always a typo and read ambiguously (C++ compilesa < b < cas(a < b) < c). - Reverse. Accept every chain again.
- Status. Accepted; today mixed chains are accepted (
print(1 < x > 2)runs), so the checker needs the error plus a compile-fail test.