Пример #1
0
// Add returns the result of adding n and obj.  The equivalent Python is "n +
// obj".
//
// Return value: New Reference.
func (n *NumberProtocol) Add(obj *Base) (*Base, error) {
	ret := C.PyNumber_Add(cnp(n), obj.c())
	return obj2ObjErr(ret)
}
Пример #2
0
// Add returns the result of adding n and obj.  The equivalent Python is "n +
// obj".
//
// Return value: New Reference.
func (n *NumberProtocol) Add(obj Object) (Object, error) {
	ret := C.PyNumber_Add(cnp(n), c(obj))
	return obj2ObjErr(ret)
}