looking at cython source https://github.com/cython/cython/blob/master/Cython/Includes/cpython/string.pxd, seems like I can declare types as just object and not PyObject* in arguments, hopefully sweet