##// END OF EJS Templates
revset: added basic operators to orderedlazyset...
Lucas Moscovicz -
r20612:60c308b9 default
parent child Browse files
Show More
@@ -2227,6 +2227,14 b' class orderedlazyset(lazyset):'
2227 def filter(self, l):
2227 def filter(self, l):
2228 return orderedlazyset(self, l, ascending=self._ascending)
2228 return orderedlazyset(self, l, ascending=self._ascending)
2229
2229
2230 def __and__(self, x):
2231 return orderedlazyset(self, lambda r: r in x,
2232 ascending=self._ascending)
2233
2234 def __sub__(self, x):
2235 return orderedlazyset(self, lambda r: r not in x,
2236 ascending=self._ascending)
2237
2230 class generatorset(object):
2238 class generatorset(object):
2231 """Wrapper structure for generators that provides lazy membership and can
2239 """Wrapper structure for generators that provides lazy membership and can
2232 be iterated more than once.
2240 be iterated more than once.
General Comments 0
You need to be logged in to leave comments. Login now