[Python-checkins] python/dist/src/Doc/api abstract.tex,1.15,1.16

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Thu, 13 Jun 2002 04:51:50 -0700


Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv19515/api

Modified Files:
	abstract.tex 
Log Message:
Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.


Index: abstract.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** abstract.tex	23 May 2002 16:02:28 -0000	1.15
--- abstract.tex	13 Jun 2002 11:51:48 -0000	1.16
***************
*** 82,85 ****
--- 82,127 ----
  
  
+ \begin{cfuncdesc}{PyObject*}{PyObject_RichCompare}{PyObject *o1,
+                                                    PyObject *o2, int op}
+   Compare the values of \var{o1} and \var{o2} using the operation
+   specified by \var{op}, which must be one of 
+   \constant{Py_LT},
+   \constant{Py_LE},
+   \constant{Py_EQ},
+   \constant{Py_NE},
+   \constant{Py_GT}, or
+   \constant{Py_GE}, corresponding to
+   \code{<},
+   \code{<=},
+   \code{==},
+   \code{!=},
+   \code{>}, or
+   \code{>=} respectively. This is the equivalent of the Python expression
+   \samp{\var{o1} \emph{op} \var{o2}}, where \emph{op} is the operator
+   corresponding to \var{op}. Returns the value of the comparison on
+   success, or \NULL{} on failure.
+ \end{cfuncdesc}
+ 
+ \begin{cfuncdesc}{int}{PyObject_RichCompareBool}{PyObject *o1,
+                                                  PyObject *o2, int op}
+   Compare the values of \var{o1} and \var{o2} using the operation
+   specified by \var{op}, which must be one of 
+   \constant{Py_LT},
+   \constant{Py_LE},
+   \constant{Py_EQ},
+   \constant{Py_NE},
+   \constant{Py_GT}, or
+   \constant{Py_GE}, corresponding to
+   \code{<},
+   \code{<=},
+   \code{==},
+   \code{!=},
+   \code{>}, or
+   \code{>=} respectively. Returns \code{-1} on error, \code{0} if the
+   result is false, \code{1} otherwise. This is the equivalent of the
+   Python expression \samp{\var{o1} \emph{op} \var{o2}}, where
+   \emph{op} is the operator corresponding to \var{op}.
+ \end{cfuncdesc}
+ 
  \begin{cfuncdesc}{int}{PyObject_Cmp}{PyObject *o1, PyObject *o2, int *result}
    Compare the values of \var{o1} and \var{o2} using a routine provided