python3 integer division debugging

Terry Reedy tjreedy at udel.edu
Wed Aug 28 15:23:45 EDT 2013


On 8/28/2013 11:15 AM, Neal Becker wrote:
> The change in integer division seems to be the most insidious source of silent
> errors in porting code from python2 - since it changes the behaviour or valid
> code silently.

In Python since 2.??, put 'from __future__ import integer_division' 
(sp?) at the top of your code


-- 
Terry Jan Reedy




More information about the Python-list mailing list