Floating point -> string conversions

John Fouhy jfouhy at paradise.net.nz
Tue Nov 9 21:31:52 EST 2004


aleaxit at yahoo.com (Alex Martelli) wrote in message news:<1gmxb89.r6ndtk17sltbgN%aleaxit at yahoo.com>...
> John Fouhy <jfouhy at paradise.net.nz> wrote:
>    ...
> > Why do the string and default floating point representations get rounded?
> > 
> > (and is this documented anywhere?)
> Sure, right in the "Tutorial (start here)" for example.
> http://www.python.org/dev/doc/devel/tut/node16.html
> Alex

I knew I should have looked in the tutorial, rather than just the
"numeric types" section of the library reference :-/

Actually, that page doesn't mention that '%f' will give you a
different rounding again...

-- 
John.



More information about the Python-list mailing list