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 Rahul Bishain
Recipients Rahul Bishain
Date 2020-04-12.19:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586720489.25.0.970851417478.issue40264@roundup.psfhosted.org>
In-reply-to
Content
Even though item assignment throws error, the list inside tuple 'a' gets modified in place. Refer below, where the list value [8] gets added to the list value [5,6,7,7] at a[3]

>>> a
(2, 3, 4, [5, 6, 7, 7], 1)
>>> id(a[3])
140531212178376
>>> a[3]+=[8]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> a
(2, 3, 4, [5, 6, 7, 7, 8], 1)
>>> id(a[3])
140531212178376
History
Date User Action Args
2020-04-12 19:41:29Rahul Bishainsetrecipients: + Rahul Bishain
2020-04-12 19:41:29Rahul Bishainsetmessageid: <1586720489.25.0.970851417478.issue40264@roundup.psfhosted.org>
2020-04-12 19:41:29Rahul Bishainlinkissue40264 messages
2020-04-12 19:41:29Rahul Bishaincreate