Show More
@@ -2743,9 +2743,16 b' class filteredset(abstractsmartset):' | |||||
2743 | return lambda: self._iterfilter(it()) |
|
2743 | return lambda: self._iterfilter(it()) | |
2744 |
|
2744 | |||
2745 | def __nonzero__(self): |
|
2745 | def __nonzero__(self): | |
2746 |
fast = |
|
2746 | fast = None | |
2747 | if fast is None: |
|
2747 | candidates = [self.fastasc if self.isascending() else None, | |
2748 | fast = self.fastdesc |
|
2748 | self.fastdesc if self.isdescending() else None, | |
|
2749 | self.fastasc, | |||
|
2750 | self.fastdesc] | |||
|
2751 | for candidate in candidates: | |||
|
2752 | if candidate is not None: | |||
|
2753 | fast = candidate | |||
|
2754 | break | |||
|
2755 | ||||
2749 | if fast is not None: |
|
2756 | if fast is not None: | |
2750 | it = fast() |
|
2757 | it = fast() | |
2751 | else: |
|
2758 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now