(self, name, default=_MISSING)
return self._fields[name]
Get a metadata field.
Get a metadata field.
Get a metadata field .
def get(self, name, default=_MISSING):
        """Get a metadata field."""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]
def get ( self , name , default = _MISSING ) : name = self . _convert_name ( name ) if name not in self . _fields : if default is _MISSING : default = self . _default_value ( name ) return default if name in _UNICODEFIELDS : value = self . _fields [ name ] return value elif name in _LISTFIELDS : value = self . _fields [ name ] if value is None : return [ ] res = [ ] for val in value : if name not in _LISTTUPLEFIELDS : res . append ( val ) else : # That's for Project-URL res . append ( ( val [ 0 ] , val [ 1 ] ) ) return res elif name in _ELEMENTSFIELD : value = self . _fields [ name ] if isinstance ( value , string_types ) : return value . split ( ',' ) return self . _fields [ name ]