def __getitem__(self, n):
        """Get the nth item in this result set. This is inefficient: all
        items up to n are materialized and thrown away.
        """
        if not self._rows and not self.sort:
            # Fully materialized and already in order. Just look up the
            # object.
            return self._objects[n]

        it = iter(self)
        try:
            for i in range(n):
                it.next()
            return it.next()
        except __HOLE__:
            raise IndexError(u'result index {0} out of range'.format(n))
dataset/ETHPy150Open beetbox/beets/beets/dbcore/db.py/Results.__getitem__