its PyObject* vs void*, we can move the cast into the function too, but its only used in these two spots so it doesn't matter