##// END OF EJS Templates
addset: implement first and last methods...
Pierre-Yves David -
r22810:7f97cb12 default
parent child Browse files
Show More
@@ -2618,6 +2618,16 b' class addset(abstractsmartset):'
2618 if self._ascending is not None:
2618 if self._ascending is not None:
2619 self._ascending = not self._ascending
2619 self._ascending = not self._ascending
2620
2620
2621 def first(self):
2622 if self:
2623 return self._list.first()
2624 return None
2625
2626 def last(self):
2627 if self:
2628 return self._list.last()
2629 return None
2630
2621 class generatorset(abstractsmartset):
2631 class generatorset(abstractsmartset):
2622 """Wrap a generator for lazy iteration
2632 """Wrap a generator for lazy iteration
2623
2633
General Comments 0
You need to be logged in to leave comments. Login now