Jean-Paul Calderone <[email protected]> added the comment: 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__). ---------- nosy: +exarkun _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue7910> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
