mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Improve markup in PyUnicode_RichCompare.
This commit is contained in:
parent
757ea27b0f
commit
4873fb2bac
1 changed files with 12 additions and 17 deletions
|
@ -1564,25 +1564,20 @@ They all return \NULL{} or \code{-1} if an exception occurs.
|
||||||
PyObject *right,
|
PyObject *right,
|
||||||
int op}
|
int op}
|
||||||
|
|
||||||
% This entry could use some polishing - my TeX is too
|
Rich compare two unicode strings and return one of the following:
|
||||||
% rusty these days... (MAL)
|
\begin{itemize}
|
||||||
|
\item \code{NULL} in case an exception was raised
|
||||||
|
\item \constant{Py_True} or \constant{Py_False} for successful comparisons
|
||||||
|
\item \constant{Py_NotImplemented} in case the type combination is unknown
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
Rich compare two strings and return one of the following:
|
Note that \constant{Py_EQ} and \constant{Py_NE} comparisons can cause a
|
||||||
\begin{verbatim}
|
\exception{UnicodeWarning} in case the conversion of the arguments to
|
||||||
- NULL in case an exception was raised
|
Unicode fails with a \exception{UnicodeDecodeError}.
|
||||||
- Py_True or Py_False for successfuly comparisons
|
|
||||||
- Py_NotImplemented in case the type combination is unknown
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in
|
|
||||||
case the conversion of the arguments to Unicode fails with a
|
|
||||||
UnicodeDecodeError.
|
|
||||||
|
|
||||||
Possible values for \var{op}:
|
|
||||||
\begin{verbatim}
|
|
||||||
Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
|
Possible values for \var{op} are
|
||||||
|
\constant{Py_GT}, \constant{Py_GE}, \constant{Py_EQ},
|
||||||
|
\constant{Py_NE}, \constant{Py_LT}, and \constant{Py_LE}.
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\begin{cfuncdesc}{PyObject*}{PyUnicode_Format}{PyObject *format,
|
\begin{cfuncdesc}{PyObject*}{PyUnicode_Format}{PyObject *format,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue