Old Man Yells At Cloud

Rick Johnson rantingrickjohnson at gmail.com
Tue Sep 19 20:48:28 EDT 2017


On Tuesday, September 19, 2017 at 2:08:05 AM UTC-5, Steven D'Aprano wrote:
> [...]
> 5.6775 is a much more useful answer than Fraction(2271, 400). ("What's 
> that in real money?")

Steven, you're not using floats for currency are you? 

Tsk tsk!

Besides, if Python division returned a useless fraction like
Fraction(2271, 400), all you'd have to do is cast it to
something appropriate, which in the case of currency, would
be a decimal, not a float.



More information about the Python-list mailing list