@property
    def range(self):
        try:
            value = self.env['HTTP_RANGE']
            if '=' in value:
                unit, sep, req_range = value.partition('=')
            else:
                msg = "The value must be prefixed with a range unit, e.g. 'bytes='"
                raise HTTPInvalidHeader(msg, 'Range')
        except KeyError:
            return None

        if req_range in ',':
            msg = 'The value must be a continuous range.'
            raise HTTPInvalidHeader(msg, 'Range')

        try:
            first, sep, last = req_range.partition('-')

            if not sep:
                raise ValueError()

            if first:
                return (int(first), int(last or -1))
            elif last:
                return (-int(last), -1)
            else:
                msg = 'The range offsets are missing.'
                raise HTTPInvalidHeader(msg, 'Range')

        except ValueError:
            href = 'http://goo.gl/zZ6Ey'
            href_text = 'HTTP/1.1 Range Requests'
            msg = ('It must be a range formatted according to RFC 7233.')
            raise HTTPInvalidHeader(msg, 'Range', href=href,
                                    href_text=href_text)
dataset/ETHPy150Open falconry/falcon/falcon/request.py/Request.range/swapped operands of `in`