##// END OF EJS Templates
baseset: empty or one-element sets are ascending and descending...
Pierre-Yves David -
r22863:a1a02b51 default
parent child Browse files
Show More
@@ -2368,12 +2368,16 b' class baseset(abstractsmartset):'
2368 """Returns True if the collection is ascending order, False if not.
2368 """Returns True if the collection is ascending order, False if not.
2369
2369
2370 This is part of the mandatory API for smartset."""
2370 This is part of the mandatory API for smartset."""
2371 if len(self) <= 1:
2372 return True
2371 return self._ascending is not None and self._ascending
2373 return self._ascending is not None and self._ascending
2372
2374
2373 def isdescending(self):
2375 def isdescending(self):
2374 """Returns True if the collection is descending order, False if not.
2376 """Returns True if the collection is descending order, False if not.
2375
2377
2376 This is part of the mandatory API for smartset."""
2378 This is part of the mandatory API for smartset."""
2379 if len(self) <= 1:
2380 return True
2377 return self._ascending is not None and not self._ascending
2381 return self._ascending is not None and not self._ascending
2378
2382
2379 def first(self):
2383 def first(self):
General Comments 0
You need to be logged in to leave comments. Login now