equal
deleted
inserted
replaced
2716 |
2716 |
2717 def __and__(self, other): |
2717 def __and__(self, other): |
2718 """Returns a new object with the intersection of the two collections. |
2718 """Returns a new object with the intersection of the two collections. |
2719 |
2719 |
2720 This is part of the mandatory API for smartset.""" |
2720 This is part of the mandatory API for smartset.""" |
|
2721 if isinstance(other, fullreposet): |
|
2722 return self |
2721 return self.filter(other.__contains__, cache=False) |
2723 return self.filter(other.__contains__, cache=False) |
2722 |
2724 |
2723 def __add__(self, other): |
2725 def __add__(self, other): |
2724 """Returns a new object with the union of the two collections. |
2726 """Returns a new object with the union of the two collections. |
2725 |
2727 |