Lines Matching refs:stop
32 stop = min(end, length)
33 return (start, stop)
98 def __init__(self, start, stop, length): argument
99 if not _is_content_range_valid(start, stop, length):
101 "Bad start:stop/length: %r-%r/%r" % (start, stop, length))
103 self.stop = stop # this is python-style range end (non-inclusive)
115 assert self.stop is None
117 stop = self.stop - 1 # from non-inclusive to HTTP-style
118 return 'bytes %s-%s/%s' % (self.start, stop, length)
126 return iter([self.start, self.stop, self.length])
146 def _is_content_range_valid(start, stop, length, response=False): argument
147 if (start is None) != (stop is None):
152 return 0 <= start < stop
153 elif start >= stop:
155 elif response and stop > length: