Object Protocol¶
-
PyObject*
Py_NotImplemented¶ The
NotImplementedsingleton, used to signal that an operation is not implemented for the given type combination.
-
Py_RETURN_NOTIMPLEMENTED¶ Properly handle returning
Py_NotImplementedfrom within a C function (that is, increment the reference count of NotImplemented and return it).
-
int
PyObject_Print(PyObject *o, FILE *fp, int flags)¶ Print an object o, on file fp. Returns
-1on error. The flags argument is used to enable certain printing options. The only option currently supported isPy_PRINT_RAW; if given, thestr()of the object is written instead of therepr().
-
int
PyObject_HasAttr(PyObject *o, PyObject *attr_name)¶ Returns
1if o has the attribute attr_name, and0otherwise. This is equivalent to the Python expressionhasattr(o, attr_name). This function always succeeds.
-
int
PyObject_HasAttrString(PyObject *o, const char *attr_name)¶ Returns
1if o has the attribute attr_name, and0otherwise. This is equivalent to the Python expressionhasattr(o, attr_name). This function always succeeds.
