##// END OF EJS Templates
revset: changed methods in spanset to return ordered sets...
Lucas Moscovicz -
r20659:4f68acdb default
parent child Browse files
Show More
@@ -2409,12 +2409,18 b' class spanset(object):'
2409 def __and__(self, x):
2409 def __and__(self, x):
2410 if isinstance(x, baseset):
2410 if isinstance(x, baseset):
2411 x = x.set()
2411 x = x.set()
2412 return lazyset(self, lambda r: r in x)
2412 if self._start <= self._end:
2413 return orderedlazyset(self, lambda r: r in x)
2414 else:
2415 return orderedlazyset(self, lambda r: r in x, ascending=False)
2413
2416
2414 def __sub__(self, x):
2417 def __sub__(self, x):
2415 if isinstance(x, baseset):
2418 if isinstance(x, baseset):
2416 x = x.set()
2419 x = x.set()
2417 return lazyset(self, lambda r: r not in x)
2420 if self._start <= self._end:
2421 return orderedlazyset(self, lambda r: r not in x)
2422 else:
2423 return orderedlazyset(self, lambda r: r not in x, ascending=False)
2418
2424
2419 def __add__(self, x):
2425 def __add__(self, x):
2420 def iterates():
2426 def iterates():
General Comments 0
You need to be logged in to leave comments. Login now