On Dec 19, 9:23�am, Joe Strout <j...@strout.net> wrote:
> Peter Otten wrote:
> > If you are using Python 2.x:
> > ...
> > So you better throw in a float(...):
>
> Or, add
>
> � �from __future__ import division
>
> at the top of the file. �I put this at the top of all my Python files,
> whether I expect to be dividing or not. �It just saves grief.

If you want division to be floating point.
If, like me, you rarely do floating point
division and want the "/" to mean integer
division as God intended, then you don't
put from __future__ import division in your
source files.

That's one of the good things about Python,
you can have it either way.


>
> Cheers,
> - Joe

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

Reply via email to