Show More
@@ -2621,6 +2621,7 b' class generatorset(abstractsmartset):' | |||||
2621 | gen: a generator producing the values for the generatorset. |
|
2621 | gen: a generator producing the values for the generatorset. | |
2622 | """ |
|
2622 | """ | |
2623 | self._gen = gen |
|
2623 | self._gen = gen | |
|
2624 | self._asclist = None | |||
2624 | self._cache = {} |
|
2625 | self._cache = {} | |
2625 | self._genlist = [] |
|
2626 | self._genlist = [] | |
2626 | self._finished = False |
|
2627 | self._finished = False | |
@@ -2712,7 +2713,13 b' class generatorset(abstractsmartset):' | |||||
2712 | cache[item] = True |
|
2713 | cache[item] = True | |
2713 | genlist(item) |
|
2714 | genlist(item) | |
2714 | yield item |
|
2715 | yield item | |
2715 |
self._finished |
|
2716 | if not self._finished: | |
|
2717 | self._finished = True | |||
|
2718 | asc = self._genlist[:] | |||
|
2719 | asc.sort() | |||
|
2720 | self._asclist = asc | |||
|
2721 | self.fastasc = asc.__iter__ | |||
|
2722 | self.fastdesc = asc.__reversed__ | |||
2716 |
|
2723 | |||
2717 | def set(self): |
|
2724 | def set(self): | |
2718 | return self |
|
2725 | return self |
General Comments 0
You need to be logged in to leave comments.
Login now