def return_values(obj):
 if isinstance(obj, (text_type, binary_type)):
  if obj:
   (yield to_native(obj, errors='surrogate_or_strict'))
  return
 elif isinstance(obj, SEQUENCETYPE):
  for element in obj:
   for subelement in return_values(element):
    (yield subelement)
 elif isinstance(obj, Mapping):
  for element in obj.items():
   for subelement in return_values(element[1]):
    (yield subelement)
 elif isinstance(obj, (bool, NoneType)):
  return
 elif isinstance(obj, NUMBERTYPES):
  (yield to_native(obj, nonstring='simplerepr'))
 else:
  raise TypeError(('Unknown parameter type: %s, %s' % (type(obj), obj)))

def return_values ( obj ) : if isinstance ( obj , ( text_type , binary_type ) ) : if obj : ( yield to_native ( obj , errors = 'surrogate_or_strict' ) ) return elif isinstance ( obj , SEQUENCETYPE ) : for element in obj : for subelement in return_values ( element ) : ( yield subelement ) elif isinstance ( obj , Mapping ) : for element in obj . items ( ) : for subelement in return_values ( element [ 1 ] ) : ( yield subelement ) elif isinstance ( obj , ( bool , NoneType ) ) : return elif isinstance ( obj , NUMBERTYPES ) : ( yield to_native ( obj , nonstring = 'simplerepr' ) ) else : raise TypeError ( ( 'Unknown parameter type: %s, %s' % ( type ( obj ) , obj ) ) )
return native stringified values from datastructures .