Augument assignment versus regular assignment

Terry Reedy tjreedy at udel.edu
Mon Jul 17 13:43:10 EDT 2006


"Antoon Pardon" <apardon at forel.vub.ac.be> wrote in message 
news:slrnebmhkp.tg1.apardon at rcpc42.vub.ac.be...
> On 2006-07-15, Terry Reedy <tjreedy at udel.edu> wrote:
>> The problem with understanding augmented assignment is that  it directs 
>> the
>> compiler and interpreter to do one or maybe two mostly invisible
>> optimizations.  To me, the effective meaning of 'evalutating once versus
>> twice' is most easily seen in the byte code generated by what is, 
>> remember,
>> the reference implementation.  What it does is what the
>> less-than-super-clear doc means.
>
> But what does one do, if the question is raised whether or not the
> code generated actually behaves as described by the language reference?
>
> Shouldn't the language reference be clear enough to be understandable
> without the help of byte code generated by the reference implementation?
> Otherwise the reference implemenation is being used as part of the
> language definition and then it can never be wrong.
>
> -- 
> Antoon Pardon
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 






More information about the Python-list mailing list