precision of float in a dict

Sven Brandt sven_NOSPAM at manastar.de
Fri May 23 08:29:44 EDT 2003


Hi,

has a float value in a dictionary a lesser precision than 'outside'?

E.g.

   my_float=0.1
   my_dict={'my_value':my_float}
   print my_float
   print my_dict
   return printed

returns

0.1
{'my_value': 0.10000000000000001}

Since I'm doing some (small scale) accounting using Python I was just 
wondering ...

Regards
Sven





More information about the Python-list mailing list