[New-bugs-announce] [issue22481] Lists within tuples mutability issue
Владимир Тырин
report at bugs.python.org
Wed Sep 24 16:20:48 CEST 2014
New submission from Владимир Тырин:
This behavior seems to be very strange.
>>> l = [1, 2, 3]
>>> t = ('a', l)
>>> t
('a', [1, 2, 3])
>>> t[1] += [4]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> t
('a', [1, 2, 3, 4])
----------
messages: 227451
nosy: Владимир.Тырин
priority: normal
severity: normal
status: open
title: Lists within tuples mutability issue
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22481>
_______________________________________
More information about the New-bugs-announce
mailing list