[issue8750] Many of MutableSet's methods assume that the other parameter is not self
Raymond Hettinger
report at bugs.python.org
Wed May 19 07:58:50 CEST 2010
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Here's a possible fix:
def __isub__(self, it):
if it is self:
self.clear()
else:
for value in it:
self.discard(value)
return self
----------
nosy: +rhettinger
versions: +Python 2.6, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8750>
_______________________________________
More information about the Python-bugs-list
mailing list