summaryrefslogtreecommitdiffstats
path: root/Doc/api
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-25 20:28:10 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-25 20:28:10 (GMT)
commit9d67d5e9f78f33da616be9e839b987deda7e6c07 (patch)
treecdf3b8b688f60b09cffd8e2cb55ae61bc80ee31a /Doc/api
parent66c0935d6725c49fda028fc9de27157fb9609a56 (diff)
downloadcpython-9d67d5e9f78f33da616be9e839b987deda7e6c07.zip
cpython-9d67d5e9f78f33da616be9e839b987deda7e6c07.tar.gz
cpython-9d67d5e9f78f33da616be9e839b987deda7e6c07.tar.bz2
Someone seems to just have copy-pasted the docs of
tp_compare to tp_richcompare ;)
Diffstat (limited to 'Doc/api')
-rw-r--r--Doc/api/newtypes.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/api/newtypes.tex b/Doc/api/newtypes.tex
index 64c2f6b..28f77f7 100644
--- a/Doc/api/newtypes.tex
+++ b/Doc/api/newtypes.tex
@@ -990,10 +990,10 @@ The following three fields only exist if the
An optional pointer to the rich comparison function.
The signature is the same as for \cfunction{PyObject_RichCompare()}.
- The function should return \code{1} if the requested comparison
- returns true, \code{0} if it returns false. It should return
- \code{-1} and set an exception condition when an error occurred
- during the comparison.
+ The function should return the result of the comparison (usually
+ \code{Py_True} or \code{Py_False}). If the comparison is undefined,
+ it must return \code{Py_NotImplemented}, if another error occurred
+ it must return \code{NULL} and set an exception condition.
This field is inherited by subtypes together with
\member{tp_compare} and \member{tp_hash}: a subtype inherits all