Augument assignment versus regular assignment

Terry Reedy tjreedy at udel.edu
Thu Jul 20 15:24:25 EDT 2006


"Antoon Pardon" <apardon at forel.vub.ac.be> wrote in message 
news:slrnebulr5.6ig.apardon at rcpc42.vub.ac.be...
> On 2006-07-19, Terry Reedy <tjreedy at udel.edu> wrote:
>>
>> But I won't.  The amount of duplication that can be factored out with
>> augmented assignment depends on the granularity of operations.
>
> I can agree with that. But until now each time I tried to
> suggest that the STORE_SUBSCR or __setitem__ are involved
> in the evaluation of the target, I was told I shouldn't
> look at things that way.

I don't think that I have said that, but only that a 'pragmatic' definition 
is 'what actually is factored out'.

>> And the
>> granularity of operations depends on the interpreter.  Hence my claim 
>> that
>> the details are necessarily interpreter dependent.
>
> Well my impression from reading the language reference is that
> it suggests that a greater amount of duplication is factored out
> than the granularity of the CPython implementation allows.

Perhaps all that is meant to be promised is that function calls are not 
duplicated, but if so, that could be much clearer.  I would have to look at 
more different types of expressions and their corresponding byte code 
before suggesting anything particular.

> I would like to thank everybody for their contributions, but I
> think everything worth while has been said, so I will no longer
> contribute to this thread.

Agreed.

Terry Jan Reedy






More information about the Python-list mailing list