def __getitem__(self, item):
    for (i, element) in enumerate(self):
        if (i == item):
            return element
    raise IndexError(('Pathspec index (%s) out of range' % item))
def __getitem__(self, item):
    for (i, element) in enumerate(self):
        if (i == item):
            return element
    raise IndexError(('Pathspec index (%s) out of range' % item))