Part of bzrlib
Function | intersect | Given two ranges return the range where they intersect or None. |
Function | compare_range | Compare a[astart:aend] == b[bstart:bend], without slicing. |
Class | Merge3 | 3-way merge of texts. |
Function | main | Undocumented |
Given two ranges return the range where they intersect or None.
>>> intersect((0, 10), (0, 6)) (0, 6) >>> intersect((0, 10), (5, 15)) (5, 10) >>> intersect((0, 10), (10, 15)) >>> intersect((0, 9), (10, 15)) >>> intersect((0, 9), (7, 15)) (7, 9)