[Python-Dev] Caching float(0.0)

Fredrik Lundh fredrik at pythonware.com
Fri Sep 29 17:11:02 CEST 2006

Nick Craig-Wood wrote:

> Is there any reason why float() shouldn't cache the value of 0.0 since
> it is by far and away the most common value?

says who ?

(I just checked the program I'm working on, and my analysis tells me 
that the most common floating point value in that program is 121.216, 
which occurs 32 times.  from what I can tell, 0.0 isn't used at all.)


More information about the Python-Dev mailing list