Exemplo n.º 1
0
// Repr returns a String representation of "obj".  This is equivalent to the
// Python "repr(obj)".
//
// Return value: New Reference.
func (obj *Base) Repr() (*Base, error) {
	ret := C.PyObject_Repr(obj.c())
	return obj2ObjErr(ret)
}
Exemplo n.º 2
0
// PyObject* PyObject_Repr(PyObject *o)
// Return value: New reference.
// Compute a string representation of object o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression repr(o). Called by the repr() built-in function and by reverse quotes.
func (self *PyObject) Repr() *PyObject {
	return togo(C.PyObject_Repr(self.ptr))
}
Exemplo n.º 3
0
// Repr returns a String representation of "obj".  This is equivalent to the
// Python "repr(obj)".
//
// Return value: New Reference.
func (obj *BaseObject) Repr() (Object, error) {
	ret := C.PyObject_Repr(c(obj))
	return obj2ObjErr(ret)
}