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 stutzbach
Recipients stutzbach
Date 2010-05-18.13:44:19
SpamBayes Score 0.0045454563
Marked as misclassified No
Message-id <1274190262.36.0.827917272731.issue8750@psf.upfronthosting.co.za>
In-reply-to
Content
For example, here is one of MutableSet's methods:

    def __isub__(self, it):
        for value in it:
            self.discard(value)
        return self

However, if I do "x -= x", then it mutates my set-like object during iteration, which even the built-in set does not support.  ior, iand, and ixor have the same problem.

I'm working on running test_set.py (with suitable modifications) on my class that derives from collections.MutableSet, so I'm going to be bumping into all kinds of fun problems like this.

I'm going to override the methods in my class, and I can contribute my new methods back to Python as a patch once they're working.
History
Date User Action Args
2010-05-18 13:44:22stutzbachsetrecipients: + stutzbach
2010-05-18 13:44:22stutzbachsetmessageid: <1274190262.36.0.827917272731.issue8750@psf.upfronthosting.co.za>
2010-05-18 13:44:20stutzbachlinkissue8750 messages
2010-05-18 13:44:19stutzbachcreate