// int PyList_SetSlice(PyObject *list, Py_ssize_t low, Py_ssize_t high, PyObject *itemlist) // Set the slice of list between low and high to the contents of itemlist. Analogous to list[low:high] = itemlist. The itemlist may be NULL, indicating the assignment of an empty list (slice deletion). Return 0 on success, -1 on failure. Negative indices, as when slicing from Python, are not supported. // // Changed in version 2.5: This function used an int for low and high. This might require changes in your code for properly supporting 64-bit systems. func PyList_SetSlice(self *PyObject, low, high int, itemlist *PyObject) error { err := C.PyList_SetSlice(topy(self), C.Py_ssize_t(low), C.Py_ssize_t(high), topy(itemlist)) return int2err(err) }
func (l *List) SetSlice(low, high int64, items *List) error { ret := C.PyList_SetSlice(c(l), C.Py_ssize_t(low), C.Py_ssize_t(high), c(items)) return int2Err(ret) }