MCPcopy Index your code
hub / github.com/RustPython/RustPython / compare_total_mag

Method compare_total_mag

Lib/_pydecimal.py:2970–2979  ·  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

2968
2969
2970 def compare_total_mag(self, other, context=None):
2971 """Compares self to other using abstract repr., ignoring sign.
2972
2973 Like compare_total, but with operand's sign ignored and assumed to be 0.
2974 """
2975 other = _convert_other(other, raiseit=True)
2976
2977 s = self.copy_abs()
2978 o = other.copy_abs()
2979 return s.compare_total(o)
2980
2981 def copy_abs(self):
2982 """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