Message105974
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. |
|
Date |
User |
Action |
Args |
2010-05-18 13:44:22 | stutzbach | set | recipients:
+ stutzbach |
2010-05-18 13:44:22 | stutzbach | set | messageid: <1274190262.36.0.827917272731.issue8750@psf.upfronthosting.co.za> |
2010-05-18 13:44:20 | stutzbach | link | issue8750 messages |
2010-05-18 13:44:19 | stutzbach | create | |
|