#NEWLINE# def to_python( self , struct_obj ) : #NEWLINE# #INDENT# elt_values = [ ] #NEWLINE# for ( field_name , field_type ) in self . _fields_ : #NEWLINE# #INDENT# c_elt = getattr ( struct_obj , field_name ) #NEWLINE# if isinstance ( field_type , StructT ) : #NEWLINE# #INDENT# c_elt = c_elt . contents #NEWLINE# #UNINDENT# py_elt = field_type . to_python ( c_elt ) #NEWLINE# elt_values . append ( py_elt ) #NEWLINE# #UNINDENT# return tuple ( field_type )