Traditionally, one part of the expression has to be a float for the
result to be a float (this is a holdover from C). So 100/3.0 will give
you the result you want. Alternatively, you can put "from __future__
import division" at the top of your script, and then 100/3 will return
a float.

http://www.python.org/doc/2.2.3/whatsnew/node7.html

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to