MCPcopy Create free account
hub / github.com/goplus/py / GetItem

Method GetItem

tuple.go:88–91  ·  view source on GitHub ↗

Return the object at position pos in the tuple pointed to by p. If pos is out of bounds, return NULL and sets an IndexError exception. Return value: Borrowed reference.

(pos int)

Source from the content-addressed store, hash-verified

86//
87// Return value: Borrowed reference.
88func (t *Tuple) GetItem(pos int) (*Base, error) {
89 ret := C.PyTuple_GetItem(t.c(), C.Py_ssize_t(pos))
90 return obj2ObjErr(ret)
91}
92
93func (t *Tuple) GetSlice(low, high int) (*Tuple, error) {
94 ret := C.PyTuple_GetSlice(t.c(), C.Py_ssize_t(low), C.Py_ssize_t(high))

Callers 1

SliceMethod · 0.95

Calls 2

obj2ObjErrFunction · 0.85
cMethod · 0.80

Tested by

no test coverage detected