equal
deleted
inserted
replaced
2226 |
2226 |
2227 def isascending(self): |
2227 def isascending(self): |
2228 """True if the set will iterate in ascending order""" |
2228 """True if the set will iterate in ascending order""" |
2229 raise NotImplementedError() |
2229 raise NotImplementedError() |
2230 |
2230 |
2231 def ascending(self): |
|
2232 """Sorts the set in ascending order (in place). |
|
2233 |
|
2234 This is part of the mandatory API for smartset.""" |
|
2235 self.sort() |
|
2236 |
|
2237 def isdescending(self): |
2231 def isdescending(self): |
2238 """True if the set will iterate in descending order""" |
2232 """True if the set will iterate in descending order""" |
2239 raise NotImplementedError() |
2233 raise NotImplementedError() |
2240 |
|
2241 def descending(self): |
|
2242 """Sorts the set in descending order (in place). |
|
2243 |
|
2244 This is part of the mandatory API for smartset.""" |
|
2245 self.sort(reverse=True) |
|
2246 |
2234 |
2247 def min(self): |
2235 def min(self): |
2248 """return the minimum element in the set""" |
2236 """return the minimum element in the set""" |
2249 if self.fastasc is not None: |
2237 if self.fastasc is not None: |
2250 for r in self.fastasc(): |
2238 for r in self.fastasc(): |