def toBytes(url):
 if _is_unicode(url):
  try:
   url = url.encode('ASCII')
  except UnicodeError:
   raise UnicodeError((('URL ' + repr(url)) + ' contains non-ASCII characters'))
 return url

def toBytes ( url ) : if _is_unicode ( url ) : try : url = url . encode ( 'ASCII' ) except UnicodeError : raise UnicodeError ( ( ( 'URL ' + repr ( url ) ) + ' contains non-ASCII characters' ) ) return url
tobytes --> url .