Beispiel #1
0
func (t *Tuple) GetSlice(low, high int64) (*Tuple, error) {
	ret := C.PyTuple_GetSlice(c(t), C.Py_ssize_t(low), C.Py_ssize_t(high))
	if ret == nil {
		return nil, exception()
	}
	return newTuple(ret), nil
}
Beispiel #2
0
// PyObject* PyTuple_GetSlice(PyObject *p, Py_ssize_t low, Py_ssize_t high)
// Return value: New reference.
// Take a slice of the tuple pointed to by p from low to high and return it as a new tuple.
//
// Changed in version 2.5: This function used an int type for low and high. This might require changes in your code for properly supporting 64-bit systems.
func PyTuple_GetSlice(self *PyObject, low, high int) *PyObject {
	return togo(C.PyTuple_GetSlice(topy(self), C.Py_ssize_t(low), C.Py_ssize_t(high)))
}