def safe_quote(s):
 return (urllib.quote(s) if (s == urllib.unquote(s)) else s)

def safe_quote ( s ) : return ( urllib . quote ( s ) if ( s == urllib . unquote ( s ) ) else s )
url-encode strings that are not already url-encoded .