[issue21358] Augmented assignment doc: clarify 'only evaluated once'

2021-10-21 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___

[issue21358] Augmented assignment doc: clarify 'only evaluated once'

2014-06-29 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21358] Augmented assignment doc: clarify 'only evaluated once'

2014-04-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: 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

[issue21358] Augmented assignment doc: clarify 'only evaluated once'

2014-04-26 Thread Terry J. Reedy
New submission from Terry J. Reedy: https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements "An augmented assignment expression like x += 1 can be rewritten as x = x + 1 to achieve a similar, but not exactly equal effect. In the augmented version, x is only evaluat