Three comparisons. Think about where each number was born.
from decimal import Decimal a = 0.1 + 0.2 == 0.3 b = Decimal("0.1") + Decimal("0.2") == Decimal("0.3") c = Decimal(0.1) == Decimal("0.1") print(a, b, c)
True True True
False False False
False True False
False True True