diff options
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/api.tex | 113 |
1 files changed, 106 insertions, 7 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex index f75768a..227698a 100644 --- a/Doc/api/api.tex +++ b/Doc/api/api.tex @@ -1625,22 +1625,107 @@ expression \samp{\var{o1} >> \var{o2}}. \begin{cfuncdesc}{PyObject*}{PyNumber_And}{PyObject *o1, PyObject *o2} -Returns the result of ``anding'' \var{o2} and \var{o2} on success and -\NULL{} on failure. This is the equivalent of the Python -expression \samp{\var{o1} and \var{o2}}. +Returns the ``bitwise and'' of \var{o2} and \var{o2} on success and +\NULL{} on failure. This is the equivalent of the Python expression +\samp{\var{o1} \& \var{o2}}. \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyNumber_Xor}{PyObject *o1, PyObject *o2} -Returns the bitwise exclusive or of \var{o1} by \var{o2} on success, +Returns the ``bitwise exclusive or'' of \var{o1} by \var{o2} on success, or \NULL{} on failure. This is the equivalent of the Python expression \samp{\var{o1} \^{ }\var{o2}}. \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyNumber_Or}{PyObject *o1, PyObject *o2} -Returns the result of \var{o1} and \var{o2} on success, or \NULL{} on -failure. This is the equivalent of the Python expression -\samp{\var{o1} or \var{o2}}. +Returns the ``bitwise or'' of \var{o1} and \var{o2} on success, or +\NULL{} on failure. This is the equivalent of the Python expression +\samp{\var{o1} | \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceAdd}{PyObject *o1, PyObject *o2} +Returns the result of adding \var{o1} and \var{o2}, or \NULL{} on failure. +The operation is done \emph{in-place} when \var{o1} supports it. This is the +equivalent of the Python expression \samp{\var{o1} += \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceSubtract}{PyObject *o1, PyObject *o2} +Returns the result of subtracting \var{o2} from \var{o1}, or +\NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +-= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceMultiply}{PyObject *o1, PyObject *o2} +Returns the result of multiplying \var{o1} and \var{o2}, or \NULL{} on +failure. The operation is done \emph{in-place} when \var{o1} supports it. +This is the equivalent of the Python expression \samp{\var{o1} *= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceDivide}{PyObject *o1, PyObject *o2} +Returns the result of dividing \var{o1} by \var{o2}, or \NULL{} on failure. +The operation is done \emph{in-place} when \var{o1} supports it. This is the +equivalent of the Python expression \samp{\var{o1} /= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceRemainder}{PyObject *o1, PyObject *o2} +Returns the remainder of dividing \var{o1} by \var{o2}, or \NULL{} on +failure. The operation is done \emph{in-place} when \var{o1} supports it. +This is the equivalent of the Python expression \samp{\var{o1} \%= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlacePower}{PyObject *o1, PyObject *o2, PyObject *o3} +See the built-in function \function{pow()}\bifuncindex{pow}. Returns +\NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +**= \var{o2}} when o3 is \cdata{Py_None}, or an in-place variant of +\samp{pow(\var{o1}, \var{o2}, var{o3})} otherwise. If \var{o3} is to be +ignored, pass \cdata{Py_None} in its place (passing \NULL{} for \var{o3} +would cause an illegal memory access). +\end{cfuncdesc} + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceLshift}{PyObject *o1, PyObject *o2} +Returns the result of left shifting \var{o1} by \var{o2} on success, or +\NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +<<= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceRshift}{PyObject *o1, PyObject *o2} +Returns the result of right shifting \var{o1} by \var{o2} on success, or +\NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +>>= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceAnd}{PyObject *o1, PyObject *o2} +Returns the ``bitwise and'' of \var{o2} and \var{o2} on success +and \NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +\&= \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceXor}{PyObject *o1, PyObject *o2} +Returns the ``bitwise exclusive or'' of \var{o1} by \var{o2} on success, or +\NULL{} on failure. The operation is done \emph{in-place} when \var{o1} +supports it. This is the equivalent of the Python expression \samp{\var{o1} +\^= \var{o2}}. +\end{cfuncdesc} + +\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceOr}{PyObject *o1, PyObject *o2} +Returns the ``bitwise or'' of \var{o1} and \var{o2} on success, or \NULL{} +on failure. The operation is done \emph{in-place} when \var{o1} supports +it. This is the equivalent of the Python expression \samp{\var{o1} |= +\var{o2}}. \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyNumber_Coerce}{PyObject **p1, PyObject **p2} @@ -1703,6 +1788,20 @@ Return the result of repeating sequence object equivalent of the Python expression \samp{\var{o} * \var{count}}. \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PySequence_InPlaceConcat}{PyObject *o1, PyObject *o2} +Return the concatenation of \var{o1} and \var{o2} on success, and \NULL{} on +failure. The operation is done \emph{in-place} when \var{o1} supports it. +This is the equivalent of the Python expression \samp{\var{o1} += \var{o2}}. +\end{cfuncdesc} + + +\begin{cfuncdesc}{PyObject*}{PySequence_InPlaceRepeat}{PyObject *o, int count} +Return the result of repeating sequence object \var{o} \var{count} times, or +\NULL{} on failure. The operation is done \emph{in-place} when \var{o} +supports it. This is the equivalent of the Python expression \samp{\var{o} +*= \var{count}}. +\end{cfuncdesc} + \begin{cfuncdesc}{PyObject*}{PySequence_GetItem}{PyObject *o, int i} Return the \var{i}th element of \var{o}, or \NULL{} on failure. This |