Use Py_CLEAR().  Add unrelated test.
2 files changed