Mark Dickinson added the comment:
Python's `//` operator does floor division: that is, the (true) quotient is
converted to an integer by taking the floor (rounding towards -infinity)
instead of truncating (rounding towards zero).
So indeed it's not a bug. The behaviour is documented here:
h
New submission from Johannes :
I'm a bit confused because this seems to be too obvious to be a bug:
[code]
>>> -2094820900 // 1298
-1613884
>>> -2094820900 // -1298
1613883
[/code]
Obviously there is a +/- 1 difference in the result.
Tested with Python 3.7, 3.8 and 3.9 on Debian Bullseye. Am