def _ipv6_host(host):
 if (host.startswith('[') and host.endswith(']')):
  host = host.replace('%25', '%').strip('[]')
 return host

def _ipv6_host ( host ) : if ( host . startswith ( '[' ) and host . endswith ( ']' ) ) : host = host . replace ( '%25' , '%' ) . strip ( '[]' ) return host
process ipv6 address literals .