[Tutor] Percentage

Jorge Godoy godoy at ieee.org
Mon Nov 7 15:18:10 CET 2005


Steve Nelson <sanelson at gmail.com> writes:

> Don't you need to specify one of these numbers as a float?

You do.  My mistake and I haven't seen both corrections before sending my last
message. :-)

> I recall reading somewhere that all division would be 'true division'
> from >3.0 but this isn't the case in 2.x is it?

There was also some kind of "from future import true division method" but I
don't remember where I found it.  Oh!  Found it!  

http://mail.python.org/pipermail/python-dev/2001-July/016174.html

>>> from __future__ import division
>>> 42 / 250
0.16800000000000001
>>> 


Be seeing you,
-- 
Jorge Godoy      <godoy at ieee.org>



More information about the Tutor mailing list