Although it looks harmless, PyErr_Clear works even when no error is set.