Exemplo n.º 1
0
// Bytes returns a Bytes representation of "obj".  This is equivalent to the
// Python "bytes(obj)".  In Python 2.x this method is identical to Str().
//
// Return value: New Reference.
func (obj *Base) Bytes() (*Base, error) {
	ret := C.PyObject_Bytes(obj.c())
	return obj2ObjErr(ret)
}
Exemplo n.º 2
0
// PyObject* PyObject_Bytes(PyObject *o)
// Compute a bytes representation of object o. In 2.x, this is just a alias for PyObject_Str().
func (self *PyObject) Bytes() *PyObject {
	return togo(C.PyObject_Bytes(self.ptr))
}
Exemplo n.º 3
0
// Bytes returns a Bytes representation of "obj".  This is equivalent to the
// Python "bytes(obj)".  In Python 2.x this method is identical to Str().
//
// Return value: New Reference.
func (obj *BaseObject) Bytes() (Object, error) {
	ret := C.PyObject_Bytes(c(obj))
	return obj2ObjErr(ret)
}