0.1 and 0.2 have no exact binary representation, so the sum is 0.30000000000000004. == on floats compares values (not identity), the literals are numbers from the start, and Python floats are already double precision — there's no mixed-type promotion.
Official docs