##// 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 2499 If the ascending attribute is set, iterate over both collections at the
2500 2500 same time, yielding only one value at a time in the given order.
2501 2501 """
2502 if not self._iter:
2503 if self._ascending is None:
2504 def gen():
2505 for r in self._r1:
2502 if self._ascending is None:
2503 def gen():
2504 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 2509 yield r
2507 s = self._r1.set()
2508 for r in self._r2:
2509 if r not in s:
2510 yield r
2511 gen = gen()
2512 else:
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
2510 gen = gen()
2511 else:
2512 iter1 = iter(self._r1)
2513 iter2 = iter(self._r2)
2514 gen = self._iterordered(self._ascending, iter1, iter2)
2515 return gen
2518 2516
2519 2517 def __iter__(self):
2520 2518 if self._genlist:
General Comments 0
You need to be logged in to leave comments. Login now