Why not FP for Money?

Peter Hansen peter at engcorp.com
Fri Sep 24 07:12:42 EDT 2004


Paul Rubin wrote:
> aleaxit at yahoo.com (Alex Martelli) writes:
> 
>>yep, str(35.72) == '35.72'.
> 
> 
> Hmm.
> 
>     >>> 35.72
>     35.719999999999999
> 
> I wonder why str(35.72) is different from repr(35.72).

Because "str( [object])  Return a string containing a nicely
printable representation of an object" contains the key
phrase "nicely printable"?

-Peter



More information about the Python-list mailing list