def __getitem__(self, name):
        ''' Gets the field ``name`` from the document '''
        # fields = self.get_fields()
        if name in self._values:
            return getattr(self, name)
        raise KeyError(name)
def __getitem__ ( self , name ) : if name in self . _values : return getattr ( self , name ) raise KeyError ( name )
Gets the field ``name`` from the document