operator.__not__()

operator.__not__(obj) Return the outcome of not obj. (Note that there is no __not__() method for object instances; only the interpreter core defines this operation. The result is affected by the __bool__() and __len__() methods.)

operator.__ne__()

operator.__ne__(a, b) operator.__ge__(a, b) operator.__gt__(a, b) Perform “rich comparisons” between a and b. Specifically, lt(a, b) is equivalent to a < b, le(a, b) is equivalent to a <= b, eq(a, b) is equivalent to a == b, ne(a, b) is equivalent to a != b, gt(a, b) is equivalent to a > b and ge(a, b) is equivalent to a >= b. Note that these functions can return any value, which may or may not be interpretable as a Boolean value. See Comparisons for more information about rich co

operator.__neg__()

operator.__neg__(obj) Return obj negated (-obj).

operator.__mul__()

operator.__mul__(a, b) Return a * b, for a and b numbers.

operator.__mod__()

operator.__mod__(a, b) Return a % b.

operator.__matmul__()

operator.__matmul__(a, b) Return a @ b. New in version 3.5.

operator.__lt__()

operator.__lt__(a, b) operator.__le__(a, b) operator.__eq__(a, b) operator.__ne__(a, b) operator.__ge__(a, b) operator.__gt__(a, b) Perform “rich comparisons” between a and b. Specifically, lt(a, b) is equivalent to a < b, le(a, b) is equivalent to a <= b, eq(a, b) is equivalent to a == b, ne(a, b) is equivalent to a != b, gt(a, b) is equivalent to a > b and ge(a, b) is equivalent to a >= b. Note that these functions can return any value, which may or may not be interpretable as a

operator.__lshift__()

operator.__lshift__(a, b) Return a shifted left by b.

operator.__le__()

operator.__le__(a, b) operator.__eq__(a, b) operator.__ne__(a, b) operator.__ge__(a, b) operator.__gt__(a, b) Perform “rich comparisons” between a and b. Specifically, lt(a, b) is equivalent to a < b, le(a, b) is equivalent to a <= b, eq(a, b) is equivalent to a == b, ne(a, b) is equivalent to a != b, gt(a, b) is equivalent to a > b and ge(a, b) is equivalent to a >= b. Note that these functions can return any value, which may or may not be interpretable as a Boolean value. See Co

operator.__ixor__()

operator.__ixor__(a, b) a = ixor(a, b) is equivalent to a ^= b.