Change suggestions for method _repr_ in class LabelList(Dataset)

I think, that class LabelList(Dataset) has def _ repr _(self)→str method, which could be slightly changed. Now it looks like that:

def __repr__(self)->str:
        items = [self[i] for i in range(min(5,len(self.items)))]
        res = f'{self.__class__.__name__} ({len(self.items)} items)\n'
        res += f'x: {self.x.__class__.__name__}\n{show_some([i[0] for i in items])}\n'
        res += f'y: {self.y.__class__.__name__}\n{show_some([i[1] for i in items])}\n'
        return res + f'Path: {self.path}'

It is calling 2 times self.items, which alas isn’t part nor of the LabelList nor Dataset classes. This invokes _ getattr _ search 2 times. What I propose is to add a variable to reduce this unnecessary search, so the code would look like this:

def __repr__(self)->str:
        items_len = len(self.items)
        items = [self[i] for i in range(min(5,items_len))]
        res = f'{self.__class__.__name__} ({items_len} items)\n'
        res += f'x: {self.x.__class__.__name__}\n{show_some([i[0] for i in items])}\n'
        res += f'y: {self.y.__class__.__name__}\n{show_some([i[1] for i in items])}\n'
        return res + f'Path: {self.path}'

The code comes from the data_block.py file (line 615). I’m still new to this library. I’m making lesson 3 and alas started looking into the source code (it slows me down…).