parameters: (self)
return_statement: return to_native(rv, "ascii", "ignore")
docstring: Works exactly like :attr:`host` but will return a result that
          is restricted to ASCII.  If it finds a netloc that is not ASCII
          it will attempt to idna decode it.  This is useful for socket
          operations when the URL might include internationalized characters.
docstring_summary: Works exactly like :attr:`host` but will return a result that
          is restricted to ASCII.  If it finds a netloc that is not ASCII
          it will attempt to idna decode it.  This is useful for socket
          operations when the URL might include internationalized characters.
docstring_tokens: Works exactly like : attr : host but will return a result that is restricted to ASCII . If it finds a netloc that is not ASCII it will attempt to idna decode it . This is useful for socket operations when the URL might include internationalized characters .
function: def ascii_host(self):
          """Works exactly like :attr:`host` but will return a result that
          is restricted to ASCII.  If it finds a netloc that is not ASCII
          it will attempt to idna decode it.  This is useful for socket
          operations when the URL might include internationalized characters.
          """
          rv = self.host
          if rv is not None and isinstance(rv, text_type):
              try:
                  rv = _encode_idna(rv)
              except UnicodeError:
                  rv = rv.encode("ascii", "ignore")
          return to_native(rv, "ascii", "ignore")
function_tokens: def ascii_host ( self ) : rv = self . host if rv is not None and isinstance ( rv , text_type ) : try : rv = _encode_idna ( rv ) except UnicodeError : rv = rv . encode ( "ascii" , "ignore" ) return to_native ( rv , "ascii" , "ignore" )