Two small python fixes

* Don't use the `is` comparison for checking ints, it compares by identity, not value. It works on CPython due to an implementation detail only.

* Favor `x not in y` over `not x in y`, which has a slightly confusing parse.