def _quote(str):
 if ((str is None) or _is_legal_key(str)):
  return str
 else:
  return (('"' + str.translate(_Translator)) + '"')

def _quote ( str ) : if ( ( str is None ) or _is_legal_key ( str ) ) : return str else : return ( ( '"' + str . translate ( _Translator ) ) + '"' )
quote a string for use in a cookie header .