def View(self, start, end):
    """A generator over given lines in a buffer.

    When vim messages are viewed in this fashion, the messenger object will be
    notified that those messages were not unexpected.

    Args:
      start: The beginning of the range.
      end: A function to get the end of the range.
    Yields:
      An iterable over the range.
    Raises:
      NotEnoughOutput: when the range exceeds the buffer.
    """
    # If no start line is given, we advance to the next line. Therefore, if the
    # buffer has not yet been inspected we want to start at one before line 0.
    self._line = -1 if self._line is None else self._line
    # Vim 1-indexes lines.
    if start == vroom.controls.SPECIAL_RANGE.CURRENT_LINE:
      start = 1 - self.vim.GetCurrentLine()
    else:
      start = (self._line + 1) if start is None else (start - 1)

    # No need to decrement; vroom ranges are inclusive and vim 1-indexes.
    end = (start + 1) if end is None else end(start + 1)
    # End = 0 means check till end of buffer.
    end = len(self._data) if end is 0 else end
    # If there's an error, they'll want to know what we were looking at.
    self._last_range = (start, end)

    # Yield each relevant line in the range.
    for i in range(start, end):
      self._line = i
      if i < len(self._data):
        yield self._data[i]
      else:
        raise NotEnoughOutput(self.GetContext())

  # 'range' is the most descriptive name here. Putting 'range' in kwargs and
  # pulling it out obfuscates the code. Sorry, pylint. (Same goes for 'buffer'.)
dataset/ETHPy150Open google/vroom/vroom/buffer.py/Manager.View/swapped operands of `-`