.. _chained-comparison-all-equal: chained-comparison-all-equal / R1738 ==================================== **Message emitted:** ``Simplify chained comparison cycle to equality between the operands: %s`` **Description:** *Emitted when the operands of a boolean condition form a cycle of weak inequalities (``<=`` or ``>=``). The condition is equivalent to checking that all the operands are equal.* **Problematic code:** .. literalinclude:: /data/messages/c/chained-comparison-all-equal/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/c/chained-comparison-all-equal/good.py :language: python Created by the `refactoring `__ checker.