MCPcopy Index your code
hub / github.com/python/cpython / __mul__

Method __mul__

Lib/test/test_fractions.py:150–154  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

__class__Method · 0.45

Tested by

no test coverage detected