[SciPy-user] Python number handling?

Vincent Favre-Nicolin vincefn at users.sourceforge.net
Fri Jul 15 08:13:56 CDT 2005


> Why, why oh why did someone decide to make python do this:
>
> Integer case
>
> In [5]: 107 / 4
> Out[5]: 26

  Just use "from __future__ import division" at the beginning of your programs 
if you want to *systematically* use floating-point division. e.g.:

>>> from __future__ import division
>>> 107/4
26.75

	Vincent
-- 
Vincent Favre-Nicolin
Université Joseph Fourier
http://v.favrenicolin.free.fr
ObjCryst & Fox : http://objcryst.sourceforge.net



More information about the SciPy-user mailing list