results of division

Simon Brunning simon.brunning at gmail.com
Thu Dec 9 09:50:57 EST 2004


On Thu, 09 Dec 2004 09:38:55 -0500, Brad Tilley <bradtilley at gmail.com> wrote:
> What is the proper way to limit the results of division to only a few
> spaces after the decimal? I don't need rocket-science like precision.
> Here's an example:
> 
> 1.775 is as exact as I need to be and normally, 1.70 will do.
 
Use the new decimal type - <http://www.python.org/doc/2.4/whatsnew/node9.html>.

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list