summaryrefslogtreecommitdiffstats
path: root/Lib/_abcoll.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_abcoll.py')
-rw-r--r--Lib/_abcoll.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
index cc4c442..8a8c0ee 100644
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -143,7 +143,7 @@ class Container(metaclass=ABCMeta):
class Callable(metaclass=ABCMeta):
@abstractmethod
- def __contains__(self, x):
+ def __call__(self, *args, **kwds):
return False
@classmethod
@@ -225,7 +225,8 @@ class Set(Sized, Iterable, Container):
def __or__(self, other):
if not isinstance(other, Iterable):
return NotImplemented
- return self._from_iterable(itertools.chain(self, other))
+ chain = (e for s in (self, other) for e in s)
+ return self._from_iterable(chain)
def __sub__(self, other):
if not isinstance(other, Set):