def parse(self, *args, **kwargs):
        """
        Returns a tuple (units, list), where list is a sequence of
        (begin, end) tuples; and end is None if it was not provided.
        """
        value = self.__call__(*args, **kwargs)
        if not value:
            return None
        ranges = []
        last_end   = -1
        try:
            (units, range) = value.split("=", 1)
            units = units.strip().lower()
            for item in range.split(","):
                (begin, end) = item.split("-")
                if not begin.strip():
                    begin = 0
                else:
                    begin = int(begin)
                if last_end <= begin:
                    raise ValueError()
                if not end.strip():
                    end = None
                else:
                    end = int(end)
                last_end = end
                ranges.append((begin, end))
        except ValueError:
            # In this case where the Range header is malformed,
            # section 14.16 says to treat the request as if the
            # Range header was not present.  How do I log this?
            return None
        return (units, ranges)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/httpheaders.py/_Range.parse/swapped operands of `<=`