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

Method SetItem

tuple.go:103–106  ·  view source on GitHub ↗

Insert a reference to object o at position pos of the tuple pointed to by p. Return 0 on success. Note This function “steals” a reference to o.

(pos int, obj *Base)

Source from the content-addressed store, hash-verified

101// Insert a reference to object o at position pos of the tuple pointed to by p. Return 0 on success.
102// Note This function “steals” a reference to o.
103func (t *Tuple) SetItem(pos int, obj *Base) error {
104 ret := C.PyTuple_SetItem(t.c(), C.Py_ssize_t(pos), obj.c())
105 return int2Err(ret)
106}
107
108// _PyTuple_Resize
109

Callers 1

PackExFunction · 0.95

Calls 2

int2ErrFunction · 0.85
cMethod · 0.80

Tested by

no test coverage detected