Show More
@@ -2190,6 +2190,12 b' class baseset(list):' | |||||
2190 | This is part of the mandatory API for smartset.""" |
|
2190 | This is part of the mandatory API for smartset.""" | |
2191 | self.sort(reverse=True) |
|
2191 | self.sort(reverse=True) | |
2192 |
|
2192 | |||
|
2193 | def min(self): | |||
|
2194 | return min(self) | |||
|
2195 | ||||
|
2196 | def max(self): | |||
|
2197 | return max(self) | |||
|
2198 | ||||
2193 | def set(self): |
|
2199 | def set(self): | |
2194 | """Returns a set or a smartset containing all the elements. |
|
2200 | """Returns a set or a smartset containing all the elements. | |
2195 |
|
2201 | |||
@@ -2268,6 +2274,12 b' class lazyset(object):' | |||||
2268 | def descending(self): |
|
2274 | def descending(self): | |
2269 | self._subset.sort(reverse=True) |
|
2275 | self._subset.sort(reverse=True) | |
2270 |
|
2276 | |||
|
2277 | def min(self): | |||
|
2278 | return min(self) | |||
|
2279 | ||||
|
2280 | def max(self): | |||
|
2281 | return max(self) | |||
|
2282 | ||||
2271 | def __contains__(self, x): |
|
2283 | def __contains__(self, x): | |
2272 | c = self._cache |
|
2284 | c = self._cache | |
2273 | if x not in c: |
|
2285 | if x not in c: |
General Comments 0
You need to be logged in to leave comments.
Login now