|
2 | 2 | Binary Operators |
3 | 3 | Operator Method |
4 | 4 | + object.__add__(self, other) |
| 5 | + |
5 | 6 | - object.__sub__(self, other) |
| 7 | + |
6 | 8 | * object.__mul__(self, other) |
| 9 | + |
7 | 10 | // object.__floordiv__(self, other) |
| 11 | + |
8 | 12 | / object.__truediv__(self, other) |
9 | 13 | % object.__mod__(self, other) |
| 14 | + |
10 | 15 | ** object.__pow__(self, other[, modulo]) |
| 16 | + |
11 | 17 | << object.__lshift__(self, other) |
| 18 | + |
12 | 19 | >> object.__rshift__(self, other) |
| 20 | +
|
13 | 21 | & object.__and__(self, other) |
| 22 | + |
14 | 23 | ^ object.__xor__(self, other) |
| 24 | + |
15 | 25 | | object.__or__(self, other) |
| 26 | + |
16 | 27 | Extended Assignments |
17 | 28 | Operator Method |
18 | 29 | += object.__iadd__(self, other) |
| 30 | + |
19 | 31 | -= object.__isub__(self, other) |
| 32 | + |
20 | 33 | *= object.__imul__(self, other) |
| 34 | + |
21 | 35 | /= object.__idiv__(self, other) |
| 36 | + |
22 | 37 | //= object.__ifloordiv__(self, other) |
23 | 38 | %= object.__imod__(self, other) |
| 39 | + |
24 | 40 | **= object.__ipow__(self, other[, modulo]) |
| 41 | + |
25 | 42 | <<= object.__ilshift__(self, other) |
| 43 | + |
26 | 44 | >>= object.__irshift__(self, other) |
| 45 | +
|
27 | 46 | &= object.__iand__(self, other) |
| 47 | + |
28 | 48 | ^= object.__ixor__(self, other) |
| 49 | + |
29 | 50 | |= object.__ior__(self, other) |
| 51 | + |
30 | 52 | Unary Operators |
31 | 53 | Operator Method |
32 | 54 | - object.__neg__(self) |
| 55 | + |
33 | 56 | + object.__pos__(self) |
| 57 | + |
34 | 58 | abs() object.__abs__(self) |
| 59 | + |
35 | 60 | ~ object.__invert__(self) |
| 61 | + |
36 | 62 | complex() object.__complex__(self) |
| 63 | + |
37 | 64 | int() object.__int__(self) |
| 65 | + |
38 | 66 | long() object.__long__(self) |
| 67 | + |
39 | 68 | float() object.__float__(self) |
| 69 | + |
40 | 70 | oct() object.__oct__(self) |
| 71 | + |
41 | 72 | hex() object.__hex__(self |
| 73 | + |
42 | 74 | Comparison Operators |
43 | 75 | Operator Method |
44 | 76 | < object.__lt__(self, other) |
| 77 | + |
45 | 78 | <= object.__le__(self, other) |
| 79 | + |
46 | 80 | == object.__eq__(self, other) |
| 81 | + |
47 | 82 | != object.__ne__(self, other) |
| 83 | + |
48 | 84 | >= object.__ge__(self, other) |
| 85 | +
|
49 | 86 | > object.__gt__(self, other) |
0 commit comments