Aha. That's interesting.

On Friday, August 26, 2016 at 2:11:32 AM UTC-7, Peter Otten wrote:
> mlz wrote:
> 
> > Yes, I just worked that out. It's the integer math that's the problem.
> > 
> > I guess this has been fixed in python 3, but unfortunately it seems that
> > most people are still using python 2.
> 
> Note that you can get Python 3's default behaviour in Python 2 with
> 
> from __future__ import division
> 
> at the beginning of the module.
> 
> >>> 2/3
> 0
> >>> from __future__ import division
> >>> 2/3
> 0.6666666666666666

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

Reply via email to