MCPcopy Create free account
hub / github.com/ActiveState/code / __or__

Method __or__

recipes/Python/574428_Container/recipe-574428.py:35–41  ·  view source on GitHub ↗
(self,other)

Source from the content-addressed store, hash-verified

33 res.append(item)
34 return Container(res)
35 def __or__(self,other): # Union
36 self.union = operator.or_
37 res = self.value[:]
38 for item in other:
39 if item not in res:
40 res.append(item)
41 return Container(res)
42 def insideout(self,other): # !=Intersection != Union item only in x but not in y
43 res = []
44 for item in self.switch:

Callers

nothing calls this directly

Calls 2

ContainerClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected