]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add doc for Py_RETURN_NOTIMPLEMENTED, added in #12724.
authorBrian Curtin <brian@python.org>
Thu, 11 Aug 2011 14:41:31 +0000 (09:41 -0500)
committerBrian Curtin <brian@python.org>
Thu, 11 Aug 2011 14:41:31 +0000 (09:41 -0500)
Doc/c-api/object.rst

index d0d45ad0012b9575450816f4015bd6b032b893e3..88ba5ac0c4efcb8491daa41fc210d6e3c9f30c90 100644 (file)
@@ -6,6 +6,19 @@ Object Protocol
 ===============
 
 
+.. c:var:: PyObject* Py_NotImplemented
+
+   The ``NotImplemented`` singleton, used to signal that an operation is
+   not implemented for the given type combination.
+
+
+.. c:macro:: Py_RETURN_NOTIMPLEMENTED
+
+   Properly handle returning :c:data:`Py_NotImplemented` from within a C
+   function (that is, increment the reference count of NotImplemented and
+   return it).
+
+
 .. c:function:: int PyObject_Print(PyObject *o, FILE *fp, int flags)
 
    Print an object *o*, on file *fp*.  Returns ``-1`` on error.  The flags argument