summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/object.rst
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-08-11 14:41:31 (GMT)
committerBrian Curtin <brian@python.org>2011-08-11 14:41:31 (GMT)
commit49281076c1dcc3d8d7b5592a49dd9c65c1e6b8a4 (patch)
treec400cb7d1d78df3111290b9f9909ef1cce7a2a97 /Doc/c-api/object.rst
parentf0dda5f876966b27c92046c7be2bc6fb420f654b (diff)
downloadcpython-49281076c1dcc3d8d7b5592a49dd9c65c1e6b8a4.zip
cpython-49281076c1dcc3d8d7b5592a49dd9c65c1e6b8a4.tar.gz
cpython-49281076c1dcc3d8d7b5592a49dd9c65c1e6b8a4.tar.bz2
Add doc for Py_RETURN_NOTIMPLEMENTED, added in #12724.
Diffstat (limited to 'Doc/c-api/object.rst')
-rw-r--r--Doc/c-api/object.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index d0d45ad..88ba5ac 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -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