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

Method CallObject

object.go:262–269  ·  view source on GitHub ↗

CallObject calls obj with the given args. args may be nil. Returns the result of the call, or an Error on failure. This is equivalent to "obj(*args)" in Python. Return value: New Reference.

(args *Tuple)

Source from the content-addressed store, hash-verified

260//
261// Return value: New Reference.
262func (obj *Base) CallObject(args *Tuple) (*Base, error) {
263 var a *C.PyObject = nil
264 if args != nil {
265 a = args.c()
266 }
267 ret := C.PyObject_CallObject(obj.c(), a)
268 return obj2ObjErr(ret)
269}
270
271func (obj *Base) CallMethodObject(name string, args *Tuple) (*Base, error) {
272 cname := C.CString(name)

Callers 2

CallObjArgsMethod · 0.95
CallExFunction · 0.80

Calls 2

cMethod · 0.95
obj2ObjErrFunction · 0.85

Tested by

no test coverage detected