// GetItem returns the element of "obj" corresponding to "key". This is // equivalent to the Python "obj[key]". // // Return value: New Reference. func (obj *Base) GetItem(key *Base) (*Base, error) { ret := C.PyObject_GetItem(obj.c(), key.c()) return obj2ObjErr(ret) }
// GetItem returns the element of "obj" corresponding to "key". This is // equivalent to the Python "obj[key]". // // Return value: New Reference. func (obj *BaseObject) GetItem(key Object) (Object, error) { ret := C.PyObject_GetItem(c(obj), c(key)) return obj2ObjErr(ret) }