##// END OF EJS Templates
abstractsmartset: add default implementation for __sub__
Pierre-Yves David -
r22730:aeacc205 default
parent child Browse files
Show More
@@ -2291,7 +2291,8 b' class abstractsmartset(object):'
2291 """Returns a new object with the substraction of the two collections.
2291 """Returns a new object with the substraction of the two collections.
2292
2292
2293 This is part of the mandatory API for smartset."""
2293 This is part of the mandatory API for smartset."""
2294 raise NotImplementedError()
2294 c = other.__contains__
2295 return self.filter(lambda r: not c(r))
2295
2296
2296 def filter(self, condition):
2297 def filter(self, condition):
2297 """Returns this smartset filtered by condition as a new smartset.
2298 """Returns this smartset filtered by condition as a new smartset.
General Comments 0
You need to be logged in to leave comments. Login now