##// END OF EJS Templates
smartset: add first and last methods...
Pierre-Yves David -
r22808:228b0aaf default
parent child Browse files
Show More
@@ -2262,6 +2262,18 b' class abstractsmartset(object):'
2262 raise ValueError('arg is an empty sequence')
2262 raise ValueError('arg is an empty sequence')
2263 return max(self)
2263 return max(self)
2264
2264
2265 def first(self):
2266 """return the first element in the set (user iteration perspective)
2267
2268 Return None if the set is empty"""
2269 raise NotImplementedError()
2270
2271 def last(self):
2272 """return the last element in the set (user iteration perspective)
2273
2274 Return None if the set is empty"""
2275 raise NotImplementedError()
2276
2265 def reverse(self):
2277 def reverse(self):
2266 """reverse the expected iteration order"""
2278 """reverse the expected iteration order"""
2267 raise NotImplementedError()
2279 raise NotImplementedError()
General Comments 0
You need to be logged in to leave comments. Login now