equal
deleted
inserted
replaced
2272 |
2272 |
2273 def __and__(self, other): |
2273 def __and__(self, other): |
2274 """Returns a new object with the intersection of the two collections. |
2274 """Returns a new object with the intersection of the two collections. |
2275 |
2275 |
2276 This is part of the mandatory API for smartset.""" |
2276 This is part of the mandatory API for smartset.""" |
2277 raise NotImplementedError() |
2277 return self.filter(other.__contains__) |
2278 |
2278 |
2279 def __add__(self, other): |
2279 def __add__(self, other): |
2280 """Returns a new object with the union of the two collections. |
2280 """Returns a new object with the union of the two collections. |
2281 |
2281 |
2282 This is part of the mandatory API for smartset.""" |
2282 This is part of the mandatory API for smartset.""" |