parameters: (url)
return_statement: return re.sub(r'\W', '.', result).lower()
docstring: >>> reverse_url("http://www.face.bnl.gov/FACEDailyReports/Facts_I/Archive/03132003/ArchivePage.htm")
      'gov.bnl.face.www.facedailyreports.facts_i.archive.03132003.archivepage.htm'
docstring_summary: >>> reverse_url("http://www.face.bnl.gov/FACEDailyReports/Facts_I/Archive/03132003/ArchivePage.htm")
      'gov.bnl.face.www.facedailyreports.facts_i.archive.03132003.archivepage.htm'
docstring_tokens: >>> reverse_url ( http : // www . face . bnl . gov / FACEDailyReports / Facts_I / Archive / 03132003 / ArchivePage . htm ) gov . bnl . face . www . facedailyreports . facts_i . archive . 03132003 . archivepage . htm
function: def reverse_url(url):
      """
      >>> reverse_url("http://www.face.bnl.gov/FACEDailyReports/Facts_I/Archive/03132003/ArchivePage.htm")
      'gov.bnl.face.www.facedailyreports.facts_i.archive.03132003.archivepage.htm'
      """
      components = urlsplit(url)
      hostname = components.netloc.partition(':')[0]
      result = '.'.join(hostname.split('.')[::-1])
      if components.path:
          result += components.path
      if components.query:
          result += '.' + components.query
      if components.fragment:
          result += components.fragment
  
      return re.sub(r'\W', '.', result).lower()
function_tokens: def reverse_url ( url ) : components = urlsplit ( url ) hostname = components . netloc . partition ( ':' ) [ 0 ] result = '.' . join ( hostname . split ( '.' ) [ : : - 1 ] ) if components . path : result += components . path if components . query : result += '.' + components . query if components . fragment : result += components . fragment return re . sub ( r'\W' , '.' , result ) . lower ( )