"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can someone explain to me why the expression 5 / -2 evaluates to -3, > especially considering that -2 * -3 evaluates to 6?
With same sign int division, one can think of the result as either being rounding down or rounding to zero. With mixed sign int division, rounding to zero becomes rounding up, so the language designer has to choose being consistent with one or the other but not both. There are pluses and minuses either way and different language designers have made different choices between the two. Guido's rational was posted some years ago but I forget. You might be able to find something in Google's c.l.p archives, or on the web in general. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list