(self, other, mod=None)
| 3606 | else: |
| 3607 | return I(pow(int(self), int(other), int(mod))) |
| 3608 | def __rpow__(self, other, mod=None): |
| 3609 | if mod is None: |
| 3610 | return I(pow(int(other), int(self), mod)) |
| 3611 | else: |
| 3612 | return I(pow(int(other), int(self), int(mod))) |
| 3613 | |
| 3614 | self.assertEqual(repr(I(1) + I(2)), "I(3)") |
| 3615 | self.assertEqual(repr(I(1) + 2), "I(3)") |