(self, other)
| 148 | self.numerator = n |
| 149 | self.denominator = d |
| 150 | def __mul__(self, other): |
| 151 | if isinstance(other, F): |
| 152 | return NotImplemented |
| 153 | return self.__class__(self.numerator * other.numerator, |
| 154 | self.denominator * other.denominator) |
| 155 | def __rmul__(self, other): |
| 156 | return self.__class__(other.numerator * self.numerator, |
| 157 | other.denominator * self.denominator) |