a *= b not equivalent to a = a*b

mlzarathustra at gmail.com mlzarathustra at gmail.com
Fri Aug 26 03:44:33 EDT 2016


Here's the key:

$ python2
Python 2.7.10 ...
>>> 1/2
0
>>>

$ python
Python 3.5.1 ...
>>> 1/2
0.5
>>> 1//2
0
>>>

I read about this awhile ago, but it's not until it bites you that you remember fully.





More information about the Python-list mailing list