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 scgtrp
Recipients scgtrp
Date 2011-03-15.22:20:47
SpamBayes Score 1.8288079e-09
Marked as misclassified No
Message-id <1300227649.12.0.439926761488.issue11562@psf.upfronthosting.co.za>
In-reply-to
Content
Using += to append to a list inside a tuple raises a TypeError but succeeds in appending the value anyway:

>>> t = (1, [2, 3, 4])
>>> t[1].append(5)
>>> t[1] += [6]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> t
(1, [2, 3, 4, 5, 6])

I have reproduced this on all the Python interpreters available to me (CPython 2.6, 2.7, and 3.1).
History
Date User Action Args
2011-03-15 22:20:49scgtrpsetrecipients: + scgtrp
2011-03-15 22:20:49scgtrpsetmessageid: <1300227649.12.0.439926761488.issue11562@psf.upfronthosting.co.za>
2011-03-15 22:20:47scgtrplinkissue11562 messages
2011-03-15 22:20:47scgtrpcreate