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

Method compare_total_mag

Lib/_pydecimal.py:4265–4271  ·  view source on GitHub ↗

Compares two operands using their abstract representation ignoring sign. Like compare_total, but with operand's sign ignored and assumed to be 0.

(self, a, b)

Source from the content-addressed store, hash-verified

4263 return a.compare_total(b)
4264
4265 def compare_total_mag(self, a, b):
4266 """Compares two operands using their abstract representation ignoring sign.
4267
4268 Like compare_total, but with operand's sign ignored and assumed to be 0.
4269 """
4270 a = _convert_other(a, raiseit=True)
4271 return a.compare_total_mag(b)
4272
4273 def copy_abs(self, a):
4274 """Returns a copy of the operand with the sign set to 0.

Callers 1

Calls 2

_convert_otherFunction · 0.85
compare_total_magMethod · 0.45

Tested by 1