Show More
@@ -2622,7 +2622,7 class _generatorset(abstractsmartset): | |||
|
2622 | 2622 | This class does not duck-type baseset and it's only supposed to be used |
|
2623 | 2623 | internally |
|
2624 | 2624 | """ |
|
2625 | def __init__(self, gen): | |
|
2625 | def __init__(self, gen, iterasc=None): | |
|
2626 | 2626 | """ |
|
2627 | 2627 | gen: a generator producing the values for the generatorset. |
|
2628 | 2628 | """ |
@@ -2630,6 +2630,11 class _generatorset(abstractsmartset): | |||
|
2630 | 2630 | self._cache = {} |
|
2631 | 2631 | self._genlist = baseset([]) |
|
2632 | 2632 | self._finished = False |
|
2633 | if iterasc is not None: | |
|
2634 | if iterasc: | |
|
2635 | self.fastasc = self.__iter__ | |
|
2636 | else: | |
|
2637 | self.fastdesc = self.__iter__ | |
|
2633 | 2638 | |
|
2634 | 2639 | def __nonzero__(self): |
|
2635 | 2640 | for r in self: |
General Comments 0
You need to be logged in to leave comments.
Login now