[issue8750] Many of MutableSet's methods assume that the other parameter is not self

Daniel Stutzbach report at bugs.python.org
Fri May 21 18:03:54 CEST 2010


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

Patch with unit test attached for MutableSet's:

x ^= x
x -= x

I was wrong about |= and &= having a problem.  Since they don't mutate the set, they don't raise an exception (they only .add items that are already in the set).  I added tests for them but left the implementation alone.

----------
keywords: +needs review, patch
stage: unit test needed -> patch review
Added file: http://bugs.python.org/file17432/set-isub.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8750>
_______________________________________


More information about the Python-bugs-list mailing list