(self, other, mod=None)
| 3517 | else: |
| 3518 | return I(pow(int(self), int(other), int(mod))) |
| 3519 | def __rpow__(self, other, mod=None): |
| 3520 | if mod is None: |
| 3521 | return I(pow(int(other), int(self), mod)) |
| 3522 | else: |
| 3523 | return I(pow(int(other), int(self), int(mod))) |
| 3524 | |
| 3525 | self.assertEqual(repr(I(1) + I(2)), "I(3)") |
| 3526 | self.assertEqual(repr(I(1) + 2), "I(3)") |