##// END OF EJS Templates
revset: added basic operations to lazyset...
Lucas Moscovicz -
r20428:2e33cda4 default
parent child Browse files
Show More
@@ -2090,5 +2090,15 b' class lazyset(object):'
2090 if cond(x):
2090 if cond(x):
2091 yield x
2091 yield x
2092
2092
2093 def __and__(self, x):
2094 return lazyset(self, lambda r: r in x)
2095
2096 def __sub__(self, x):
2097 return lazyset(self, lambda r: r not in x)
2098
2099 def __add__(self, x):
2100 l = baseset([r for r in self])
2101 return l + baseset(x)
2102
2093 # tell hggettext to extract docstrings from these functions:
2103 # tell hggettext to extract docstrings from these functions:
2094 i18nfunctions = symbols.values()
2104 i18nfunctions = symbols.values()
General Comments 0
You need to be logged in to leave comments. Login now