MCPcopy Create free account
hub / github.com/python/cpython / compare_total_mag

Method compare_total_mag

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

4266 return a.compare_total(b)
4267
4268 def compare_total_mag(self, a, b):
4269 """Compares two operands using their abstract representation ignoring sign.
4270
4271 Like compare_total, but with operand's sign ignored and assumed to be 0.
4272 """
4273 a = _convert_other(a, raiseit=True)
4274 return a.compare_total_mag(b)
4275
4276 def copy_abs(self, a):
4277 """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