python3: use Py_TYPE(obj) instead of obj->ob_type