Lesson 3

Leave a comment
If `.0406` is a floating point then `decimal.Decimal(.0406)` is a decimal *of a floating point* meaning it will have the same imprecision as the floating point. If you pass `decimal.Decimal()` a string it will perform as expected, eg, `decimal.Decimal('0.406')`.