equal
deleted
inserted
replaced
2605 self._ascending = False |
2605 self._ascending = False |
2606 else: |
2606 else: |
2607 if self._ascending: |
2607 if self._ascending: |
2608 self.reverse() |
2608 self.reverse() |
2609 |
2609 |
2610 def __and__(self, other): |
|
2611 filterfunc = other.__contains__ |
|
2612 if self._ascending is not None: |
|
2613 return orderedlazyset(self, filterfunc, ascending=self._ascending) |
|
2614 return filteredset(self, filterfunc) |
|
2615 |
|
2616 def __sub__(self, other): |
2610 def __sub__(self, other): |
2617 filterfunc = lambda r: r not in other |
2611 filterfunc = lambda r: r not in other |
2618 if self._ascending is not None: |
2612 if self._ascending is not None: |
2619 return orderedlazyset(self, filterfunc, ascending=self._ascending) |
2613 return orderedlazyset(self, filterfunc, ascending=self._ascending) |
2620 return filteredset(self, filterfunc) |
2614 return filteredset(self, filterfunc) |