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 andy.chugunov
Recipients andy.chugunov
Date 2013-05-14.08:19:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368519577.93.0.961015588209.issue17973@psf.upfronthosting.co.za>
In-reply-to
Content
At the same time append() succeeds silently, while simple '+' fails.

Here's an example:
>>> a = ([1],)
>>> a[0].append(2)
>>> a
([1, 2],)
>>> a[0] += [3]
Traceback (most recent call last):
  File "<pyshell#47>", line 1, in <module>
    a[0] += [3]
TypeError: 'tuple' object does not support item assignment
>>> a
([1, 2, 3],)
>>> a[0] = a[0] + [4]
Traceback (most recent call last):
  File "<pyshell#49>", line 1, in <module>
    a[0] = a[0] + [4]
TypeError: 'tuple' object does not support item assignment
>>> a
([1, 2, 3],)
>>> 

Looks like a self-contradictory behavior. Unfortunately, I'm not yet advanced enough to figure out where the problem might be and submit a fix.

Tested with v3.3.1 on Windows 7 (64-bit), and v3.2.3 and v2.7.3 on Debian 7 (also 64-bit).
History
Date User Action Args
2013-05-14 08:19:37andy.chugunovsetrecipients: + andy.chugunov
2013-05-14 08:19:37andy.chugunovsetmessageid: <1368519577.93.0.961015588209.issue17973@psf.upfronthosting.co.za>
2013-05-14 08:19:37andy.chugunovlinkissue17973 messages
2013-05-14 08:19:37andy.chugunovcreate