def lookup(self, host_value):
        """Get a host value matching the given value.

        :param host_value: a value of the host of a type that can be
        listed by the service
        :returns: an instance of AddressListItem representing
        a matched value
        :raises InvalidHostError: if the argument is not a valid
        host string
        """
        try:
            host_object = self._host_factory(host_value)
        except InvalidHostError:
            return None
        result = self._get_match_and_classification(
            host_object
        )
        host_item, classification = result
        if host_item is not None:
            return AddressListItem(
                host_item.to_unicode(),
                self,
                classification
            )
        return None
def lookup ( self , host_value ) : try : host_object = self . _host_factory ( host_value ) except InvalidHostError : return None result = self . _get_match_and_classification ( host_object ) host_item , classification = result if host_item is not None : return AddressListItem ( host_item . to_unicode ( ) , self , classification ) return None
Get a host value matching the given value.

        :param host_value: a value of the host of a type that can be
        listed by the service
        :returns: an instance of AddressListItem representing
        a matched value
        :raises InvalidHostError: if the argument is not a valid
        host string