>> Python will always yield a number x = m%n such that 0 <= x < n, but 
>> Turbo C will always yield a number such that if x = m%n -x = -m%n.  That 
>> is, since 111 % 10 = 1, -111 % 10 = -1.  The two values will always 
>> differ by n (as used above). 


Maybe it is an order-of-operations thing....

-111 % 10 = -1
(-111) % 10 = 9
?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to