def __getitem__(self, key):
    'Return a slice of Entries.\n\n        Because Attributes may be sparse, a multi-element slice will return\n        None for those elements which do not have associated Entries.\n\n        @param key: index or range of Entry number to return\n        @type key: slice or int\n        @return: a list of entries, appropriate type.\n        @raise IndexError: if L{key} is an int and that Entry number does not\n                           exist.\n        '
    if (key is Ellipsis):
        key = slice(None, None, None)
    if hasattr(key, 'indices'):
        idx = range(*key.indices((self.max_idx() + 1)))
        return [(self._get_entry(i) if self.has_entry(i) else None) for i in idx]
    elif self.has_entry(key):
        return self._get_entry(key)
    else:
        raise IndexError((('list index ' + str(key)) + ' out of range.'))
Return a slice of Entries.

Because Attributes may be sparse, a multi-element slice will return
None for those elements which do not have associated Entries.

@param key: index or range of Entry number to return
@type key: slice or int
@return: a list of entries, appropriate type.
@raise IndexError: if L{key} is an int and that Entry number does not
                   exist.
def __getitem__(self, key):
    'Return a slice of Entries.\n\n        Because Attributes may be sparse, a multi-element slice will return\n        None for those elements which do not have associated Entries.\n\n        @param key: index or range of Entry number to return\n        @type key: slice or int\n        @return: a list of entries, appropriate type.\n        @raise IndexError: if L{key} is an int and that Entry number does not\n                           exist.\n        '
    if (key is Ellipsis):
        key = slice(None, None, None)
    if hasattr(key, 'indices'):
        idx = range(*key.indices((self.max_idx() + 1)))
        return [(self._get_entry(i) if self.has_entry(i) else None) for i in idx]
    elif self.has_entry(key):
        return self._get_entry(key)
    else:
        raise IndexError((('list index ' + str(key)) + ' out of range.'))