[Tutor] operator order

Danny Yoo dyoo at hashcollision.org
Thu Jan 31 20:20:48 CET 2013


On Thu, Jan 31, 2013 at 11:36 AM, heathen <godsofliberty at lavabit.com> wrote:
> why is this:
>
>>>> d *= 3 + 4


The gory details about how Python understands this expression can be found in:

    http://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements

Technically, "3 + 4" is the "expression list" part of the statement,
so it gets evaluated.  Then it does the multiplication of the target
(d) and the value of the expression list (7).


More information about the Tutor mailing list