'Add another range
@type start: L{int}
@param start: Start of range, or only message number
@type end: Optional L{int}
@param end: End of range.'

def add(self, start, end=_empty):

    if (end is self._empty):
        end = start
    if (self._last is not self._empty):
        if (start is None):
            start = self.last
        if (end is None):
            end = self.last
    (start, end) = sorted([start, end], key=functools.partial(_swap, that=self._infinity, ifIs=None))
    self.ranges.append((start, end))
    self.clean()
