Re: [Numpy-discussion] How to trigger warnings for integer division in python 2

2016-08-19 Thread Stuart Berg
> I guess the question is whether we should aim to add at least some of > these warnings As you can probably guess, I think such a feature would be very useful :-) When my team started planning our migration to Python 3, we quickly realized that the integer division issue was our biggest risk.

Re: [Numpy-discussion] How to trigger warnings for integer division in python 2

2016-08-19 Thread Sebastian Berg
On Fr, 2016-08-19 at 11:29 -0400, Stuart Berg wrote: > Hi, > > To help people migrate their code bases from Python 2 to Python 3, > the python interpreter has a handy option '-3' that issues warnings > at runtime.  One of the warnings is for integer division: > > $ echo "print 3/2" > /tmp/foo.py

[Numpy-discussion] How to trigger warnings for integer division in python 2

2016-08-19 Thread Stuart Berg
Hi, To help people migrate their code bases from Python 2 to Python 3, the python interpreter has a handy option '-3' that issues warnings at runtime. One of the warnings is for integer division: $ echo "print 3/2" > /tmp/foo.py $ python -3 /tmp/foo.py /tmp/foo.py:1: DeprecationWarning: classic