New submission from Matteo Dell'Amico de...@linux.it:
The current MutableSet.__iand__ implementation calls self.discard while
iterating on self. This creates strange problems while implementing
MutableSet with simple choices. For example, consider the attached file
which implements set by
Matteo Dell'Amico de...@linux.it added the comment:
I suggest solving the problem by changing the implementation to:
def __iand__(self, c):
self -= self - c:
or to
def __iand__(self, c):
for item in self - c:
self.discard(item)
--
Changes by Georg Brandl ge...@python.org:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5647
___
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Thanks for the report. Fixed in r70969, r70970, r70973, and r70974.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org