[Tutor] operator order

Aurélien DESBRIÈRES aurelien at cwb.io
Thu Jan 31 20:17:59 CET 2013


heathen <godsofliberty at lavabit.com> writes:

> why is this:
>
>>>> d = 2
>>>> d *= 3 + 4
>>>> d
> 14

hmm ...


because d * the result of 3 + 4


> not this:
>
>>>> d = 2
>>>> d = d * 3 + 4
>>>> d
> 10

and here it d multiply by 3 + 4

> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

-- 
Aurélien DESBRIÈRES
Ride free! Ride GNU.ORG


More information about the Tutor mailing list