Exemplo n.º 1
0
// Subtract returns the result of subtracting obj from n.  The equivalent Python
// is "n - obj".
//
// Return value: New Reference.
func (n *NumberProtocol) Subtract(obj *Base) (*Base, error) {
	ret := C.PyNumber_Subtract(cnp(n), obj.c())
	return obj2ObjErr(ret)
}
Exemplo n.º 2
0
// Subtract returns the result of subtracting obj from n.  The equivalent Python
// is "n - obj".
//
// Return value: New Reference.
func (n *NumberProtocol) Subtract(obj Object) (Object, error) {
	ret := C.PyNumber_Subtract(cnp(n), c(obj))
	return obj2ObjErr(ret)
}