Python __rmod__() Magic Method
Syntax object.__rmod__(self, other) The Python __rmod__() method implements the reverse modulo operation with reflected, swapped operands. So, when you call x % y, Python attempts to call x.__mod__(y). If the method is not implemented, Python attempts to call __rmod__ on the right operand and if this isn’t implemented either, it raises a TypeError. We call … Read more