Message26670
Logged In: YES
user_id=6656
We found another one. Something is wrong in the compilation of augmented
assignment to subscriptions containing tuples; running this code:
class C:
def __setitem__(self, i, v):
print i, v
def __getitem__(self, i):
print i
return 0
c = C()
c[4,5] += 1
gives a spurious exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object does not support item assignment
By contrast, "c[(4,5)] += 1" works fine.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:35:38 | admin | link | issue1333982 messages |
2007-08-23 14:35:38 | admin | create | |
|