##// END OF EJS Templates
addset: drop caching through generatorset...
Pierre-Yves David -
r22799:bafa371d default
parent child Browse files
Show More
@@ -2499,22 +2499,20 b' class addset(abstractsmartset):'
2499 If the ascending attribute is set, iterate over both collections at the
2499 If the ascending attribute is set, iterate over both collections at the
2500 same time, yielding only one value at a time in the given order.
2500 same time, yielding only one value at a time in the given order.
2501 """
2501 """
2502 if not self._iter:
2502 if self._ascending is None:
2503 if self._ascending is None:
2503 def gen():
2504 def gen():
2504 for r in self._r1:
2505 for r in self._r1:
2505 yield r
2506 s = self._r1.set()
2507 for r in self._r2:
2508 if r not in s:
2506 yield r
2509 yield r
2507 s = self._r1.set()
2510 gen = gen()
2508 for r in self._r2:
2511 else:
2509 if r not in s:
2512 iter1 = iter(self._r1)
2510 yield r
2513 iter2 = iter(self._r2)
2511 gen = gen()
2514 gen = self._iterordered(self._ascending, iter1, iter2)
2512 else:
2515 return gen
2513 iter1 = iter(self._r1)
2514 iter2 = iter(self._r2)
2515 gen = self._iterordered(self._ascending, iter1, iter2)
2516 self._iter = generatorset(gen)
2517 return self._iter
2518
2516
2519 def __iter__(self):
2517 def __iter__(self):
2520 if self._genlist:
2518 if self._genlist:
General Comments 0
You need to be logged in to leave comments. Login now