public static PyLong AsLong(PyObject value) { IntPtr op = Runtime.PyNumber_Long(value.obj); if (op == IntPtr.Zero) { throw new PythonException(); } return new PyLong(op); }