#NEWLINE# def fromsuds( dt , value ) : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if isinstance ( dt , list ) : #NEWLINE# #INDENT# return [ fromsuds ( dt [ 0 ] , item ) for item in value . item ] #NEWLINE# #UNINDENT# if wsme . types . isarray ( dt ) : #NEWLINE# #INDENT# return [ fromsuds ( dt . item_type , item ) for item in value . item ] #NEWLINE# #UNINDENT# if ( wsme . types . isusertype ( dt ) and ( dt not in fromsuds_types ) ) : #NEWLINE# #INDENT# dt = dt . basetype #NEWLINE# #UNINDENT# if ( dt in fromsuds_types ) : #NEWLINE# #INDENT# print ( dt , value ) #NEWLINE# value = fromsuds_types [ dt ] ( value ) #NEWLINE# print ( value ) #NEWLINE# return value #NEWLINE# #UNINDENT# if wsme . types . iscomplex ( dt ) : #NEWLINE# #INDENT# d = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for attrdef in dt . _wsme_attributes : #NEWLINE# #INDENT# if ( not hasattr ( value , attrdef . name ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# d [ attrdef . name ] = fromsuds ( attrdef . datatype , getattr ( value , attrdef . name ) ) #NEWLINE# #UNINDENT# return d #NEWLINE# #UNINDENT# return value