Message26670
| Author |
mwh |
| Recipients |
| Date |
2006年02月09日.15:02:52 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
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.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:35:38 | admin | link | issue1333982 messages |
| 2007年08月23日 14:35:38 | admin | create |
|