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_Divide(PyObject *o1, PyObject *o2)
35 Returns the result of dividing *o1* by *o2*, or *NULL* on failure. This is the
36 equivalent of the Python expression ``o1 / o2``.
39 .. c:function:: PyObject* PyNumber_FloorDivide(PyObject *o1, PyObject *o2)
41 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
58 .. c:function:: PyObject* PyNumber_Remainder(PyObject *o1, PyObject *o2)
60 Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. This is
61 the equivalent of the Python expression ``o1 % o2``.
64 .. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)
68 See the built-in function :func:`divmod`. Returns *NULL* on failure. This is
69 the equivalent of the Python expression ``divmod(o1, o2)``.
72 .. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)
76 See the built-in function :func:`pow`. Returns *NULL* on failure. This is the
77 equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
85 equivalent of the Python expression ``-o``.
108 .. c:function:: PyObject* PyNumber_Lshift(PyObject *o1, PyObject *o2)
110 Returns the result of left shifting *o1* by *o2* on success, or *NULL* on
111 failure. This is the equivalent of the Python expression ``o1 << o2``.
114 .. c:function:: PyObject* PyNumber_Rshift(PyObject *o1, PyObject *o2)
116 Returns the result of right shifting *o1* by *o2* on success, or *NULL* on
117 failure. This is the equivalent of the Python expression ``o1 >> o2``.
120 .. c:function:: PyObject* PyNumber_And(PyObject *o1, PyObject *o2)
122 Returns the "bitwise and" of *o1* and *o2* on success and *NULL* on failure.
123 This is the equivalent of the Python expression ``o1 & o2``.
126 .. c:function:: PyObject* PyNumber_Xor(PyObject *o1, PyObject *o2)
128 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or *NULL* on
129 failure. This is the equivalent of the Python expression ``o1 ^ o2``.
132 .. c:function:: PyObject* PyNumber_Or(PyObject *o1, PyObject *o2)
134 Returns the "bitwise or" of *o1* and *o2* on success, or *NULL* on failure.
135 This is the equivalent of the Python expression ``o1 | o2``.
138 .. c:function:: PyObject* PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2)
140 Returns the result of adding *o1* and *o2*, or *NULL* on failure. The operation
141 is done *in-place* when *o1* supports it. This is the equivalent of the Python
142 statement ``o1 += o2``.
145 .. c:function:: PyObject* PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2)
147 Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. The
148 operation is done *in-place* when *o1* supports it. This is the equivalent of
149 the Python statement ``o1 -= o2``.
152 .. c:function:: PyObject* PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2)
154 Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. The
155 operation is done *in-place* when *o1* supports it. This is the equivalent of
156 the Python statement ``o1 *= o2``.
159 .. c:function:: PyObject* PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2)
161 Returns the result of dividing *o1* by *o2*, or *NULL* on failure. The
162 operation is done *in-place* when *o1* supports it. This is the equivalent of
163 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``.
175 .. c:function:: PyObject* PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2)
178 *o2*, or *NULL* on failure. The return value is "approximate" because binary
181 passed two integers. The operation is done *in-place* when *o1* supports it.
186 .. c:function:: PyObject* PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2)
188 Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. The
189 operation is done *in-place* when *o1* supports it. This is the equivalent of
190 the Python statement ``o1 %= o2``.
193 .. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
197 See the built-in function :func:`pow`. Returns *NULL* on failure. The operation
198 is done *in-place* when *o1* supports it. This is the equivalent of the Python
199 statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-place variant of
200 ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, pass :c:data:`Py_None`
204 .. c:function:: PyObject* PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2)
206 Returns the result of left shifting *o1* by *o2* on success, or *NULL* on
207 failure. The operation is done *in-place* when *o1* supports it. This is the
208 equivalent of the Python statement ``o1 <<= o2``.
211 .. c:function:: PyObject* PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2)
213 Returns the result of right shifting *o1* by *o2* on success, or *NULL* on
214 failure. The operation is done *in-place* when *o1* supports it. This is the
215 equivalent of the Python statement ``o1 >>= o2``.
218 .. c:function:: PyObject* PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2)
220 Returns the "bitwise and" of *o1* and *o2* on success and *NULL* on failure. The
221 operation is done *in-place* when *o1* supports it. This is the equivalent of
222 the Python statement ``o1 &= o2``.
225 .. c:function:: PyObject* PyNumber_InPlaceXor(PyObject *o1, PyObject *o2)
227 Returns the "bitwise exclusive or" of *o1* by *o2* on success, or *NULL* on
228 failure. The operation is done *in-place* when *o1* supports it. This is the
229 equivalent of the Python statement ``o1 ^= o2``.
232 .. c:function:: PyObject* PyNumber_InPlaceOr(PyObject *o1, PyObject *o2)
234 Returns the "bitwise or" of *o1* and *o2* on success, or *NULL* on failure. The
235 operation is done *in-place* when *o1* supports it. This is the equivalent of
236 the Python statement ``o1 |= o2``.
248 conversion is possible, or if some other error occurs, return ``-1`` (failure)
250 &o2)`` is equivalent to the Python statement ``o1, o2 = coerce(o1, o2)``.