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

Class MyDecimal

Lib/test/test_statistics.py:982–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980 x = statistics._convert(Fraction(1, 40), Decimal)
981 self.check_exact_equal(x, Decimal("0.025"))
982 class MyDecimal(Decimal):
983 def __truediv__(self, other):
984 return self.__class__(super().__truediv__(other))
985 x = statistics._convert(Fraction(-15, 16), MyDecimal)
986 self.check_exact_equal(x, MyDecimal("-0.9375"))
987

Callers 2

test_decimal_nanMethod · 0.70
test_decimalMethod · 0.70

Calls

no outgoing calls

Tested by 2

test_decimal_nanMethod · 0.56
test_decimalMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…