[PyQt] 2+1//(-10) == 1 and 2-1//10 == 2 !

Miguel Alejandro Fernandez alejandrogroso at hotmail.com
Tue Feb 2 23:30:00 GMT 2016


Error python, not have the slightest sense!


Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>> 5//50, 5%50
(0, 5)
>>>
>>>
>>> -1//50, -1%50
(-1, 49)
>>>
>>>
>>>
>>> -1//50
-1
>>>
>>>
>>> -1/50
-0.02
>>>
>>>
>>>
>>> -1/10
-0.1
>>>
>>>
>>> -(1//10)
0
>>>
>>> -21//10
-3
>>>
>>> -2//10
-1
>>>
>>>
>>> -1.0//10
-1.0
>>>
>>>
>>>
>>>
>>>
>>> -1.0//10.0
-1.0
>>>
>>> 0//10
0
>>>
>>>
>>>
>>> 0//10.0
0.0
>>>
>>>
>>>
>>> 2//10.0
0.0
>>> 1//10.0
0.0
>>>
>>>
>>>
>>>
>>> -1//10
-1
>>> 2//10.0
0.0
>>>
>>>
>>> -1//10.0
-1.0
>>>
>>>
>>>
>>> -10//10.0
-1.0
>>> -20//10.0
-2.0
>>>
>>>
>>>
>>> 2-1//10
2
>>>
>>>
>>> -1//10
-1
>>>
>>> 2+1//(-10)
1
>>>
>>> 1//(-10)
-1
>>> +1//(-10)
-1
>>>
>>>



pypy-2.4.0-win32 also returns the same results.


any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160202/e56e77fa/attachment.html>


More information about the PyQt mailing list