Exemplo n.º 1
0
// int PyFunction_SetDefaults(PyObject *op, PyObject *defaults)
// Set the argument default values for the function object op. defaults must be Py_None or a tuple.
//
// Raises SystemError and returns -1 on failure.
func PyFunction_SetDefaults(op, defaults *PyObject) error {
	return int2err(C.PyFunction_SetDefaults(topy(op), topy(defaults)))
}
Exemplo n.º 2
0
// SetDefaults sets teh arguement default values for the function "fn".  "o"
// must be either a Tuple, or None.
func (fn *Function) SetDefaults(o Object) error {
	ret := C.PyFunction_SetDefaults(c(fn), c(o))
	return int2Err(ret)
}