Message189201
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). |
|
Date |
User |
Action |
Args |
2013-05-14 08:19:37 | andy.chugunov | set | recipients:
+ andy.chugunov |
2013-05-14 08:19:37 | andy.chugunov | set | messageid: <1368519577.93.0.961015588209.issue17973@psf.upfronthosting.co.za> |
2013-05-14 08:19:37 | andy.chugunov | link | issue17973 messages |
2013-05-14 08:19:37 | andy.chugunov | create | |
|