another newbie question
Peter Otten
__peter__ at web.de
Sun Nov 14 10:03:23 EST 2010
otenki wrote:
> Hello Pythonistas!
> I'm trying to get floating point division to work; I'm using Python
> 2.6.5. When I enter 'from _future_ import division' at the command
> line, I get the ImportError, no module named _future_. How can I
> rectify this?
You need two leading/trailing underscores, not one:
>>> 1/2
0
>>> from __future__ import division
>>> 1/2
0.5
More information about the Python-list
mailing list