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 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:38adminlinkissue1333982 messages
2007-08-23 14:35:38admincreate