Show More
@@ -2283,12 +2283,7 b' class abstractsmartset(object):' | |||
|
2283 | 2283 | """Returns a new object with the union of the two collections. |
|
2284 | 2284 | |
|
2285 | 2285 | This is part of the mandatory API for smartset.""" |
|
2286 | kwargs = {} | |
|
2287 | if self.isascending() and other.isascending(): | |
|
2288 | kwargs['ascending'] = True | |
|
2289 | if self.isdescending() and other.isdescending(): | |
|
2290 | kwargs['ascending'] = False | |
|
2291 | return addset(self, other, **kwargs) | |
|
2286 | return addset(self, other) | |
|
2292 | 2287 | |
|
2293 | 2288 | def __sub__(self, other): |
|
2294 | 2289 | """Returns a new object with the substraction of the two collections. |
@@ -572,6 +572,29 b' test intersecting something with an adds' | |||
|
572 | 572 | 5 |
|
573 | 573 | 8 |
|
574 | 574 | |
|
575 | test that `or` operation combines elements in the right order: | |
|
576 | ||
|
577 | $ log '3:4 or 2:5' | |
|
578 | 3 | |
|
579 | 4 | |
|
580 | 2 | |
|
581 | 5 | |
|
582 | $ log '3:4 or 5:2' | |
|
583 | 3 | |
|
584 | 4 | |
|
585 | 5 | |
|
586 | 2 | |
|
587 | $ log 'sort(3:4 or 2:5)' | |
|
588 | 2 | |
|
589 | 3 | |
|
590 | 4 | |
|
591 | 5 | |
|
592 | $ log 'sort(3:4 or 5:2)' | |
|
593 | 2 | |
|
594 | 3 | |
|
595 | 4 | |
|
596 | 5 | |
|
597 | ||
|
575 | 598 | check that conversion to only works |
|
576 | 599 | $ try --optimize '::3 - ::1' |
|
577 | 600 | (minus |
General Comments 0
You need to be logged in to leave comments.
Login now