Ejemplo n.º 1
0
// PyObject* PyFunction_GetClosure(PyObject *op)
// Return value: Borrowed reference.
// Return the closure associated with the function object op. This can be NULL or a tuple of cell objects.
func PyFunction_GetClosure(op *PyObject) *PyObject {
	return togo(C.PyFunction_GetClosure(topy(op)))
}
Ejemplo n.º 2
0
// Closure returns the closure associated with function "fn".  This may be nil
// or a Tuple of Cell objects.
//
// Return value: Borrowed Reference.
func (fn *Function) Closure() (Object, error) {
	ret := C.PyFunction_GetClosure(c(fn))
	return obj2ObjErr(ret)
}