(self,other)
| 26 | def __len__(self): # Container length |
| 27 | return len(self.switch) |
| 28 | def __and__(self,other): # Intersection |
| 29 | self.intersect = operator.and_ |
| 30 | res = [] |
| 31 | for item in self.switch: |
| 32 | if item in other: |
| 33 | res.append(item) |
| 34 | return Container(res) |
| 35 | def __or__(self,other): # Union |
| 36 | self.union = operator.or_ |
| 37 | res = self.value[:] |