In brief
Decimal can represent decimal values that binary float cannot represent exactly. After from decimal import Decimal, Decimal('0.1') + Decimal('0.2') produces Decimal('0.3').
Useful to know
Decimal can represent decimal values that binary float cannot represent exactly. After from decimal import Decimal, Decimal('0.1') + Decimal('0.2') produces Decimal('0.3'). [1]
Constructing it from an already inexact float does not recover the original intention. Use suitable input and an explicit rounding rule for amounts. Choosing a numeric type does not itself define an invoice’s business rules.
Sources
For further detail and to check the information: