[issue29815] Fail at divide a negative integer number for a positive integer number

Marcos Thomaz report at bugs.python.org
Wed Mar 15 05:39:44 EDT 2017


Marcos Thomaz added the comment:

I'm sorry, but was a typing error. Try this operations:

a, b, c = 7, -7, 2
print "1:", a // c, a % c
print "2:", b // c, b % c

the result is:
1: 3 1
2: -4 1

The division is the same, except by the signal (variable b is negative, but both, variables "a" and "b" are integers).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29815>
_______________________________________


More information about the Python-bugs-list mailing list