Message99220
Your output looks fishy. Anyway, the behavior of += isn't a bug:
>>> a = b = (1, 2)
>>> a += (1, 2, 3)
>>> a
(1, 2, 1, 2, 3)
>>> a is b
False
>>>
It's confusing, to be sure, but no mutation is going on. += is only in-place if applied to something that supports mutation this way (by implementing __iadd__). |
|
Date |
User |
Action |
Args |
2010-02-11 15:28:23 | exarkun | set | recipients:
+ exarkun, mattrussell |
2010-02-11 15:28:23 | exarkun | set | messageid: <1265902103.31.0.502317227619.issue7910@psf.upfronthosting.co.za> |
2010-02-11 15:28:21 | exarkun | link | issue7910 messages |
2010-02-11 15:28:21 | exarkun | create | |
|