#NEWLINE# def construct_python_object_apply( self , suffix , node , newobj = False ) : #NEWLINE# #INDENT# if isinstance ( node , SequenceNode ) : #NEWLINE# #INDENT# args = self . construct_sequence ( node , deep = True ) #NEWLINE# kwds = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# state = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# listitems = [ ] #NEWLINE# dictitems = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = self . construct_mapping ( node , deep = True ) #NEWLINE# args = value . get ( 'args' , [ ] ) #NEWLINE# kwds = value . get ( 'kwds' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# state = value . get ( 'state' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# listitems = value . get ( 'listitems' , [ ] ) #NEWLINE# dictitems = value . get ( 'dictitems' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# instance = self . make_python_instance ( suffix , node , args , kwds , newobj ) #NEWLINE# if state : #NEWLINE# #INDENT# self . set_python_instance_state ( instance , state ) #NEWLINE# #UNINDENT# if listitems : #NEWLINE# #INDENT# instance . extend ( listitems ) #NEWLINE# #UNINDENT# if dictitems : #NEWLINE# #INDENT# for key in dictitems : #NEWLINE# #INDENT# instance [ instance ] = dictitems [ key ] #NEWLINE# #UNINDENT# #UNINDENT# return instance