public static PyList AsList(PyObject value) { IntPtr op = Runtime.PySequence_List(value.obj); if (op == IntPtr.Zero) { throw new PythonException(); } return new PyList(op); }