Construct a new Decimal object based from value.
class decimal.Decimal(value='0', context=None)
sign ::= '+' | '-'
digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
indicator ::= 'e' | 'E'
digits ::= digit [digit]...
decimal-part ::= digits '.' [digits] | ['.'] digits
exponent-part ::= indicator [sign] digits
infinity ::= 'Infinity' | 'Inf'
nan ::= 'NaN' [digits] | 'sNaN' [digits]
numeric-value ::= decimal-part [exponent-part] | infinity
numeric-string ::= [sign] numeric-value | [sign] nan
>>> (-7) % 4
1
>>> Decimal(-7) % Decimal(4)
Decimal('-3')
>>> -7 // 4
-2
>>> Decimal(-7) // Decimal(4)
Decimal('-1')
>>> Decimal('-3.14').as_integer_ratio()
(-157, 50)
a or b is a NaN ==> Decimal('NaN')
a < b ==> Decimal('-1')
a == b ==> Decimal('0')
a > b ==> Decimal('1')