• Home
  • Raw
  • Download

Lines Matching +full:- +full:o2

15 .. c:function:: PyObject* PyNumber_Add(PyObject *o1, PyObject *o2)
17 Returns the result of adding *o1* and *o2*, or *NULL* on failure. This is the
18 equivalent of the Python expression ``o1 + o2``.
21 .. c:function:: PyObject* PyNumber_Subtract(PyObject *o1, PyObject *o2)
23 Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. This is
24 the equivalent of the Python expression ``o1 - o2``.
27 .. c:function:: PyObject* PyNumber_Multiply(PyObject *o1, PyObject *o2)
29 Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. This is
30 the equivalent of the Python expression ``o1 * o2``.
33 .. c:function:: PyObject* PyNumber_MatrixMultiply(PyObject *o1, PyObject *o2)
35 Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on
36 failure. This is the equivalent of the Python expression ``o1 @ o2``.
41 .. c:function:: PyObject* PyNumber_FloorDivide(PyObject *o1, PyObject *o2)
43 Return the floor of *o1* divided by *o2*, or *NULL* on failure. This is
47 .. c:function:: PyObject* PyNumber_TrueDivide(PyObject *o1, PyObject *o2)
50 *o2*, or *NULL* on failure. The return value is "approximate" because binary
56 .. c:function:: PyObject* PyNumber_Remainder(PyObject *o1, PyObject *o2)
58 Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. This is
59 the equivalent of the Python expression ``o1 % o2``.
62 .. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)
66 See the built-in function :func:`divmod`. Returns *NULL* on failure. This is
67 the equivalent of the Python expression ``divmod(o1, o2)``.
70 .. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)
74 See the built-in function :func:`pow`. Returns *NULL* on failure. This is the
75 equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
83 equivalent of the Python expression ``-o``.
106 .. c:function:: PyObject* PyNumber_Lshift(PyObject *o1, PyObject *o2)
108 Returns the result of left shifting *o1* by *o2* on success, or *NULL* on
109 failure. This is the equivalent of the Python expression ``o1 << o2``.
112 .. c:function:: PyObject* PyNumber_Rshift(PyObject *o1, PyObject *o2)
114 Returns the result of right shifting *o1* by *o2* on success, or *NULL* on
115 failure. This is the equivalent of the Python expression ``o1 >> o2``.
118 .. c:function:: PyObject* PyNumber_And(PyObject *o1, PyObject *o2)
120 Returns the "bitwise and" of *o1* and *o2* on success and *NULL* on failure.
121 This is the equivalent of the Python expression ``o1 & o2``.
124 .. c:function:: PyObject* PyNumber_Xor(PyObject *o1, PyObject *o2)
126 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or *NULL* on
127 failure. This is the equivalent of the Python expression ``o1 ^ o2``.
130 .. c:function:: PyObject* PyNumber_Or(PyObject *o1, PyObject *o2)
132 Returns the "bitwise or" of *o1* and *o2* on success, or *NULL* on failure.
133 This is the equivalent of the Python expression ``o1 | o2``.
136 .. c:function:: PyObject* PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2)
138 Returns the result of adding *o1* and *o2*, or *NULL* on failure. The operation
139 is done *in-place* when *o1* supports it. This is the equivalent of the Python
140 statement ``o1 += o2``.
143 .. c:function:: PyObject* PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2)
145 Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. The
146 operation is done *in-place* when *o1* supports it. This is the equivalent of
147 the Python statement ``o1 -= o2``.
150 .. c:function:: PyObject* PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2)
152 Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. The
153 operation is done *in-place* when *o1* supports it. This is the equivalent of
154 the Python statement ``o1 *= o2``.
157 .. c:function:: PyObject* PyNumber_InPlaceMatrixMultiply(PyObject *o1, PyObject *o2)
159 Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on
160 failure. The operation is done *in-place* when *o1* supports it. This is
161 the equivalent of the Python statement ``o1 @= o2``.
166 .. c:function:: PyObject* PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2)
168 Returns the mathematical floor of dividing *o1* by *o2*, or *NULL* on failure.
169 The operation is done *in-place* when *o1* supports it. This is the equivalent
170 of the Python statement ``o1 //= o2``.
173 .. c:function:: PyObject* PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2)
176 *o2*, or *NULL* on failure. The return value is "approximate" because binary
179 passed two integers. The operation is done *in-place* when *o1* supports it.
182 .. c:function:: PyObject* PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2)
184 Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. The
185 operation is done *in-place* when *o1* supports it. This is the equivalent of
186 the Python statement ``o1 %= o2``.
189 .. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
193 See the built-in function :func:`pow`. Returns *NULL* on failure. The operation
194 is done *in-place* when *o1* supports it. This is the equivalent of the Python
195 statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-place variant of
196 ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, pass :c:data:`Py_None`
200 .. c:function:: PyObject* PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2)
202 Returns the result of left shifting *o1* by *o2* on success, or *NULL* on
203 failure. The operation is done *in-place* when *o1* supports it. This is the
204 equivalent of the Python statement ``o1 <<= o2``.
207 .. c:function:: PyObject* PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2)
209 Returns the result of right shifting *o1* by *o2* on success, or *NULL* on
210 failure. The operation is done *in-place* when *o1* supports it. This is the
211 equivalent of the Python statement ``o1 >>= o2``.
214 .. c:function:: PyObject* PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2)
216 Returns the "bitwise and" of *o1* and *o2* on success and *NULL* on failure. The
217 operation is done *in-place* when *o1* supports it. This is the equivalent of
218 the Python statement ``o1 &= o2``.
221 .. c:function:: PyObject* PyNumber_InPlaceXor(PyObject *o1, PyObject *o2)
223 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or *NULL* on
224 failure. The operation is done *in-place* when *o1* supports it. This is the
225 equivalent of the Python statement ``o1 ^= o2``.
228 .. c:function:: PyObject* PyNumber_InPlaceOr(PyObject *o1, PyObject *o2)
230 Returns the "bitwise or" of *o1* and *o2* on success, or *NULL* on failure. The
231 operation is done *in-place* when *o1* supports it. This is the equivalent of
232 the Python statement ``o1 |= o2``.
269 integer. If the call fails, an exception is raised and ``-1`` is returned.