This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients docs@python, loewis, terry.reedy
Date 2014-04-26.21:03:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398546237.47.0.497573586139.issue21358@psf.upfronthosting.co.za>
In-reply-to
Content
This is not limited to dictionaries. Augmented assignment *always* involves a read operation and a write operation. 
So Antoine's remark in msg215573 is more general;

a.x += 1

has a get and a set, and even

x += 1

has a get and a set.

I still agree that the original statement is confusing. It (implicitly) claims that 

  x = x + 1

evaluates x twice, which it does not. Instead, x is only *evaluated* once, and then written to. Only if x has subexpressions, they get evaluated only once ("evaluation" being the thing that produces a "value").
History
Date User Action Args
2014-04-26 21:03:57loewissetrecipients: + loewis, terry.reedy, docs@python
2014-04-26 21:03:57loewissetmessageid: <1398546237.47.0.497573586139.issue21358@psf.upfronthosting.co.za>
2014-04-26 21:03:56loewislinkissue21358 messages
2014-04-26 21:03:56loewiscreate