CPython function
Jython method
PyObject* intobject::PyInt_FromString(char *s, char **pend, int base)
When using asInt, consider whether you want to ensure the original object is an instanceof PyInteger/PyLong prior to calling asInt on it. It's common to do this check before calling asInt, but is not required -- otherwise asInt will attempt to implicitly convert non int/longs via user defined __int__ methods.