96 def __and__(self, other): |
96 def __and__(self, other): |
97 return AndSelector(self, other) |
97 return AndSelector(self, other) |
98 def __rand__(self, other): |
98 def __rand__(self, other): |
99 return AndSelector(other, self) |
99 return AndSelector(other, self) |
100 def __iand__(self, other): |
100 def __iand__(self, other): |
101 raise NotImplementedError('cant use inplace & (binary and)') |
101 return AndSelector(self, other) |
102 |
|
103 def __or__(self, other): |
102 def __or__(self, other): |
104 return OrSelector(self, other) |
103 return OrSelector(self, other) |
105 def __ror__(self, other): |
104 def __ror__(self, other): |
106 return OrSelector(other, self) |
105 return OrSelector(other, self) |
107 def __ior__(self, other): |
106 def __ior__(self, other): |
108 raise NotImplementedError('cant use inplace | (binary or)') |
107 return OrSelector(self, other) |
109 |
108 |
110 def __invert__(self): |
109 def __invert__(self): |
111 return NotSelector(self) |
110 return NotSelector(self) |
112 |
111 |
113 # XXX (function | function) or (function & function) not managed yet |
112 # XXX (function | function) or (function & function) not managed yet |