On Sat, May 2, 2015 at 8:13 AM, Nikos Alexandris <n...@nikosalexandris.net>
wrote:

> I just ran
>
> python -Qwarn -tt -3
>
> on a custom python script and the first line returned is
>
> gis.py:801: DeprecationWarning: classic int division
>
> Is this something that needs to be fixed?
>

in Python 2 :

1 / 2
results in 0, that's 'classic int division'

in Python 3 it results in 0.5

so it warns you that you are using 'classic int division' so in Python 3
this will change result. So depending on what you want, either use

float(1)/2

or to keep the integer division

from __future__ import division

1//2

>
> Nikos
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to