#NEWLINE# def recursive_unicode( obj ) : #NEWLINE# #INDENT# 'Walks a simple data structure, converting byte strings to unicode.\n\n    Supports lists, tuples, and dictionaries.\n    ' #NEWLINE# if isinstance ( obj , dict ) : #NEWLINE# #INDENT# return dict ( ( ( recursive_unicode ( k ) , recursive_unicode ( v ) ) for ( k , v ) in obj . items ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , list ) : #NEWLINE# #INDENT# return list ( ( recursive_unicode ( i ) for i in obj ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , tuple ) : #NEWLINE# #INDENT# return tuple ( ( recursive_unicode ( i ) for i in obj ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , bytes_type ) : #NEWLINE# #INDENT# return to_unicode ( obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return k