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.
Merge remote-tracking branch 'alex-fix-macosx/patch-1' into pr3-python-fixes
Update the inline source code with Alex's patch.
Merge branch 'pr3-python-fixes'