Python stores numbers as either exact integers or approximate binary floats, and this distinction matters deeply in finance. Learn how type coercion works, when float precision breaks down, and the defensive patterns that keep your calculations honest.
Python's integers and floats look similar but behave differently, and mixing them carelessly leads to silent errors in financial calculations. Learn how to handle numbers correctly, when to use Decimal for money, and the pitfalls that catch most practitioners.