[Python-checkins] cpython: Add doc for Py_RETURN_NOTIMPLEMENTED, added in #12724.

brian.curtin python-checkins at python.org
Thu Aug 11 16:41:53 CEST 2011


http://hg.python.org/cpython/rev/e88362fb4950
changeset: 71816:e88362fb4950
user: Brian Curtin <brian at python.org>
date: Thu Aug 11 09:41:31 2011 -0500
summary:
 Add doc for Py_RETURN_NOTIMPLEMENTED, added in #12724.
files:
 Doc/c-api/object.rst | 13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -6,6 +6,19 @@
 ===============
 
 
+.. 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
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /