Lines Matching refs:o1
18 .. c:function:: PyObject* PyNumber_Add(PyObject *o1, PyObject *o2)
20 Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. This is the
21 equivalent of the Python expression ``o1 + o2``.
24 .. c:function:: PyObject* PyNumber_Subtract(PyObject *o1, PyObject *o2)
26 Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. This is
27 the equivalent of the Python expression ``o1 - o2``.
30 .. c:function:: PyObject* PyNumber_Multiply(PyObject *o1, PyObject *o2)
32 Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. This is
33 the equivalent of the Python expression ``o1 * o2``.
36 .. c:function:: PyObject* PyNumber_MatrixMultiply(PyObject *o1, PyObject *o2)
38 Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on
39 failure. This is the equivalent of the Python expression ``o1 @ o2``.
44 .. c:function:: PyObject* PyNumber_FloorDivide(PyObject *o1, PyObject *o2)
46 Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is
50 .. c:function:: PyObject* PyNumber_TrueDivide(PyObject *o1, PyObject *o2)
52 Return a reasonable approximation for the mathematical value of *o1* divided by
59 .. c:function:: PyObject* PyNumber_Remainder(PyObject *o1, PyObject *o2)
61 Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. This is
62 the equivalent of the Python expression ``o1 % o2``.
65 .. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)
70 the equivalent of the Python expression ``divmod(o1, o2)``.
73 .. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)
78 equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
109 .. c:function:: PyObject* PyNumber_Lshift(PyObject *o1, PyObject *o2)
111 Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on
112 failure. This is the equivalent of the Python expression ``o1 << o2``.
115 .. c:function:: PyObject* PyNumber_Rshift(PyObject *o1, PyObject *o2)
117 Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on
118 failure. This is the equivalent of the Python expression ``o1 >> o2``.
121 .. c:function:: PyObject* PyNumber_And(PyObject *o1, PyObject *o2)
123 Returns the "bitwise and" of *o1* and *o2* on success and ``NULL`` on failure.
124 This is the equivalent of the Python expression ``o1 & o2``.
127 .. c:function:: PyObject* PyNumber_Xor(PyObject *o1, PyObject *o2)
129 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or ``NULL`` on
130 failure. This is the equivalent of the Python expression ``o1 ^ o2``.
133 .. c:function:: PyObject* PyNumber_Or(PyObject *o1, PyObject *o2)
135 Returns the "bitwise or" of *o1* and *o2* on success, or ``NULL`` on failure.
136 This is the equivalent of the Python expression ``o1 | o2``.
139 .. c:function:: PyObject* PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2)
141 Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. The operation
142 is done *in-place* when *o1* supports it. This is the equivalent of the Python
143 statement ``o1 += o2``.
146 .. c:function:: PyObject* PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2)
148 Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. The
149 operation is done *in-place* when *o1* supports it. This is the equivalent of
150 the Python statement ``o1 -= o2``.
153 .. c:function:: PyObject* PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2)
155 Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. The
156 operation is done *in-place* when *o1* supports it. This is the equivalent of
157 the Python statement ``o1 *= o2``.
160 .. c:function:: PyObject* PyNumber_InPlaceMatrixMultiply(PyObject *o1, PyObject *o2)
162 Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on
163 failure. The operation is done *in-place* when *o1* supports it. This is
164 the equivalent of the Python statement ``o1 @= o2``.
169 .. c:function:: PyObject* PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2)
171 Returns the mathematical floor of dividing *o1* by *o2*, or ``NULL`` on failure.
172 The operation is done *in-place* when *o1* supports it. This is the equivalent
173 of the Python statement ``o1 //= o2``.
176 .. c:function:: PyObject* PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2)
178 Return a reasonable approximation for the mathematical value of *o1* divided by
182 passed two integers. The operation is done *in-place* when *o1* supports it.
185 .. c:function:: PyObject* PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2)
187 Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The
188 operation is done *in-place* when *o1* supports it. This is the equivalent of
189 the Python statement ``o1 %= o2``.
192 .. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
197 is done *in-place* when *o1* supports it. This is the equivalent of the Python
198 statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-place variant of
199 ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, pass :c:data:`Py_None`
203 .. c:function:: PyObject* PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2)
205 Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on
206 failure. The operation is done *in-place* when *o1* supports it. This is the
207 equivalent of the Python statement ``o1 <<= o2``.
210 .. c:function:: PyObject* PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2)
212 Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on
213 failure. The operation is done *in-place* when *o1* supports it. This is the
214 equivalent of the Python statement ``o1 >>= o2``.
217 .. c:function:: PyObject* PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2)
219 Returns the "bitwise and" of *o1* and *o2* on success and ``NULL`` on failure. The
220 operation is done *in-place* when *o1* supports it. This is the equivalent of
221 the Python statement ``o1 &= o2``.
224 .. c:function:: PyObject* PyNumber_InPlaceXor(PyObject *o1, PyObject *o2)
226 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or ``NULL`` on
227 failure. The operation is done *in-place* when *o1* supports it. This is the
228 equivalent of the Python statement ``o1 ^= o2``.
231 .. c:function:: PyObject* PyNumber_InPlaceOr(PyObject *o1, PyObject *o2)
233 Returns the "bitwise or" of *o1* and *o2* on success, or ``NULL`` on failure. The
234 operation is done *in-place* when *o1* supports it. This is the equivalent of
235 the Python statement ``o1 |= o2``.