def host(self, host):
        """
        Return the configuration of a specific host as a dictionary.

        Dictionary always contains lowercase versions of the attribute names.

        Parameters
        ----------
        host : the host to return values for.

        Returns
        -------
        dict of key value pairs, excluding "Host", empty map if host is not found.
        """
        if host in self.hosts_:
            vals = defaultdict(list)
            for k, value in [(x.key.lower(), x.value) for x in self.lines_
                             if x.host == host and x.key.lower() != "host"]:
                vals[k].append(value)
            flatten = lambda x: x[0] if len(x) == 1 else x
            return {k: flatten(v) for k, v in vals.items()}
        return {}
def host ( self , host ) : if host in self . hosts_ : vals = defaultdict ( list ) for k , value in [ ( x . key . lower ( ) , x . value ) for x in self . lines_ if x . host == host and x . key . lower ( ) != "host" ] : vals [ k ] . append ( value ) flatten = lambda x : x [ 0 ] if len ( x ) == 1 else x return { k : flatten ( v ) for k , v in vals . items ( ) } return { }
Return the configuration of a specific host as a dictionary.

        Dictionary always contains lowercase versions of the attribute names.

        Parameters
        ----------
        host : the host to return values for.

        Returns
        -------
        dict of key value pairs, excluding "Host", empty map if host is not found.