def __getitem__(self, name):
        " Override __getitem__ to make lookup of pane- buffers dynamic. "
        if name.startswith('pane-'):
            try:
                id = int(name[len('pane-'):])
                return self.pymux.panes_by_id[id].scroll_buffer
            except (__HOLE__, KeyError):
                raise KeyError

        elif name.startswith('search-'):
            try:
                id = int(name[len('search-'):])
                return self.pymux.panes_by_id[id].search_buffer
            except (ValueError, KeyError):
                raise KeyError
        else:
            return super(_BufferMapping, self).__getitem__(name)
dataset/ETHPy150Open jonathanslenders/pymux/pymux/main.py/_BufferMapping.__getitem__