(self, key, default=None)
Return the first value received.
Return the first value received.
Return the first value received .
def getfirst(self, key, default=None):
        """ Return the first value received."""
        if key in self:
            value = self[key]
            if isinstance(value, list):
                return value[0].value
            else:
                return value.value
        else:
            return default
def getfirst ( self , key , default = None ) : if key in self : value = self [ key ] if isinstance ( value , list ) : return value [ 0 ] . value else : return value . value else : return default