def __getitem__(self, indexOrKey):
        value = self._data_[indexOrKey]
        if isinstance(value, dict):
            value = self._getDictClass()(value)
        elif isinstance(value, (list, tuple)): # In case the index result is a slice
            value = self._getListClass()(value)
        return value
>>> tl = AList([2, 3, 4])
dataset/ETHPy150Open petrvanblokland/Xierpa3/xierpa3/toolbox/storage/adict.py/A.__getitem__