def _idnaBytes(text):
 try:
  import idna
 except ImportError:
  return text.encode('idna')
 else:
  return idna.encode(text)

def _idnaBytes ( text ) : try : import idna except ImportError : return text . encode ( 'idna' ) else : return idna . encode ( text )
convert some text typed by a human into some ascii bytes .