Augument assignment versus regular assignment

Antoon Pardon apardon at forel.vub.ac.be
Mon Jul 17 04:13:13 EDT 2006


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



More information about the Python-list mailing list