"X is not 0" ==> "X != 0"

`is not` just happens to work for small integers due to CPython optimizations, but it's not good practice by any means. Checking the *object identity* of ints is just weird; *equality* is what really matters.