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

Erik python at lucidity.plus.com
Fri Aug 26 03:53:14 EDT 2016


On 26/08/16 08:44, mlzarathustra at gmail.com wrote:
> 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.

How is this related to your question? The example explicitly says Python 
2 and doesn't use the '//' operator.

E.



More information about the Python-list mailing list