Mark Dickinson added the comment:
It's not a bug: you're seeing Python's rules for integer division, which do
indeed differ from those of (some) other languages when either the divisor or
the dividend is negative. For integers x and y, in Python 2.x, x / y gives the
floor of the exact quoti
New submission from Alexey Radkov :
The following excerpt will show the issue:
$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 8 * 4 / ( 2 - 7 ) * 6 / 3
-14
>>>
Wh