예제 #1
0
파일: object.go 프로젝트: MogeiWang/py
// 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)
}
예제 #2
0
파일: object.go 프로젝트: gward/go-python
// 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))
}
예제 #3
0
파일: base.go 프로젝트: xushiwei/gopy
// 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)
}