Python logoPython/
PYL-C2201

Misplaced comparison constantPYL-C2201

Major severityMajor
Style categoryStyle

The constant is placed on the left side of a comparison. It is usually clearer in intent to place it in the right hand side of the comparison.

Bad practice

if 0 == x % 2:
    ...
if x % 2 == 0:
    ...