fractions.Decimal.compare

Decimal.compare(other, context=None)[source]

Compares one to another.

-1 => a < b 0 => a = b 1 => a > b NaN => one is NaN Like __cmp__, but returns Decimal instances.