(self, index)
return (key, self._main[key])
Fetch the item at position i.
Fetch the item at position i.
Fetch the item at position i .
def __getitem__(self, index):
        """Fetch the item at position i."""
        if isinstance(index, types.SliceType):
            # fetching a slice returns an OrderedDict
            return self._main[index].items()
        key = self._main._sequence[index]
        return (key, self._main[key])
def __getitem__ ( self , index ) : if isinstance ( index , types . SliceType ) : # fetching a slice returns an OrderedDict return self . _main [ index ] . items ( ) key = self . _main . _sequence [ index ] return ( key , self . _main [ key ] )