Binary floating point cannot represent 0.1 or 0.2 exactly, so their sum is 0.30000000000000004 and the comparison is False. No rounding is applied before ==, which does compare values (identity is is), and decimal literals are converted to the nearest binary double — use math.isclose() or the decimal module when exactness matters.
Official docs