[PythonCE] __future__, division

Isr Gish isrgish at fastem.com
Mon Jul 19 05:11:39 CEST 2004

   >From: "David L. Kashtan"<kashtan at Validus.Com>
   >Sent: 7/18/04 9:31:55 PM
   >To: "Isr Gish"<isrgish at fastem.com>
   >Subject: RE: [PythonCE] __future__, division
   >Why do you think that float division doesn't work?  You don't have
   >to import anything from __future__:
   >>>> a=2.1/1.23
   >>>> a
   >What am I missing?

Hi David,

Since 2.2 if you import division from __future__, then you can do this:

>>> from __future__ import division
>>> 5/3

As if you whould have done float division
>>> 5//3

All the best,


More information about the PythonCE mailing list