Show More
@@ -3137,7 +3137,12 b' class generatorset(abstractsmartset):' | |||||
3137 | self.__contains__ = self._desccontains |
|
3137 | self.__contains__ = self._desccontains | |
3138 |
|
3138 | |||
3139 | def __nonzero__(self): |
|
3139 | def __nonzero__(self): | |
3140 | for r in self: |
|
3140 | # Do not use 'for r in self' because it will enforce the iteration | |
|
3141 | # order (default ascending), possibly unrolling a whole descending | |||
|
3142 | # iterator. | |||
|
3143 | if self._genlist: | |||
|
3144 | return True | |||
|
3145 | for r in self._consumegen(): | |||
3141 | return True |
|
3146 | return True | |
3142 | return False |
|
3147 | return False | |
3143 |
|
3148 |
General Comments 0
You need to be logged in to leave comments.
Login now