python3 integer division debugging

Chris Angelico rosuav at gmail.com
Wed Aug 28 11:26:47 EDT 2013


On Thu, Aug 29, 2013 at 1:21 AM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> On 28 August 2013 16:15, Neal Becker <ndbecker2 at gmail.com> 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.
>>
>> I wish the interpreter had an instrumented mode to detect and report such
>> problems.
>
> Is that a joke?
>
> Run the code under Python 2.6/2.7 with the -3 flag:

I wouldn't say that's a joke, it's just another demonstration of
Guido's time machine :)

ChrisA



More information about the Python-list mailing list