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

Method compare_total_mag

Lib/_pydecimal.py:2973–2982  ·  view source on GitHub ↗

Compares self to other using abstract repr., ignoring sign. Like compare_total, but with operand's sign ignored and assumed to be 0.

(self, other, context=None)

Source from the content-addressed store, hash-verified

2971
2972
2973 def compare_total_mag(self, other, context=None):
2974 """Compares self to other using abstract repr., ignoring sign.
2975
2976 Like compare_total, but with operand's sign ignored and assumed to be 0.
2977 """
2978 other = _convert_other(other, raiseit=True)
2979
2980 s = self.copy_abs()
2981 o = other.copy_abs()
2982 return s.compare_total(o)
2983
2984 def copy_abs(self):
2985 """Returns a copy with the sign set to 0. """

Callers 2

compare_total_magMethod · 0.45

Calls 3

copy_absMethod · 0.95
_convert_otherFunction · 0.85
compare_totalMethod · 0.45

Tested by 1