#NEWLINE# def _safe_ParseResult( parts , encoding = 'utf8' , path_encoding = 'utf8' ) : #NEWLINE# #INDENT# return ( to_native_str ( parts . scheme ) , to_native_str ( parts . netloc . encode ( 'idna' ) ) , quote ( to_bytes ( parts . path , path_encoding ) , _safe_chars ) , quote ( to_bytes ( parts . params , path_encoding ) , _safe_chars ) , quote ( to_bytes ( parts . query , encoding ) , _safe_chars ) , quote ( to_bytes ( parts . fragment , encoding ) , _safe_chars ) )