Daniel Stutzbach <[email protected]> added the comment:
Minor point of clarity: you mean __rand__ not __radd__, right? Set objects do
not support addition at all.
Adding the __rand__ methods to collections.Set in and of itself is
straightforward:
def __rsub__(self, other):
return self._from_iterable(other) - self
__ror__ = __or__
__rand__ = __and__
__rxor__ = __xor__
I'm not sure I understand the can of worms. While replacing concrete tests
with abstract tests may be worthwhile goal in its own right, why is it
necessary to solve the particular shortcoming of missing __r* methods?
Probably I'm missing something. With just the minimal change above, what kinds
of things do you expect to fail?
(assuming Issue8743 is also fixed)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue2226>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com