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

Stuart Berg stuarteberg at gmail.com
Fri Aug 19 13:33:01 EDT 2016


> 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.  It has the
potential for subtle bugs to remain hidden in our code base long after the
migration, whereas most of the other Python 3 changes will be easier to
identify.


> and someone is willing to put in the effort (I suppose it is likely only a
> few places).
>
I am not sure how easy they are on the C side, but probably not difficult
> at all.


OK, good to hear that it shouldn't be difficult.  I've opened the following
issue on the github repo, to continue this discussion and hopefully attract
a volunteer. :-)

https://github.com/numpy/numpy/issues/7949

Best regards,
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160819/616f772d/attachment.html>


More information about the NumPy-Discussion mailing list