#NEWLINE# @ tornado . gen . coroutine #NEWLINE# def execcode_listcomp( self , nod ) : #NEWLINE# #INDENT# targets = [ ] #NEWLINE# iters = [ ] #NEWLINE# ifss = [ ] #NEWLINE# for comp in nod . generators : #NEWLINE# #INDENT# target = ( yield self . execcode_expr_store ( comp . target ) ) #NEWLINE# iter = ( yield self . execcode_expr ( comp . iter ) ) #NEWLINE# ifs = comp . ifs #NEWLINE# targets . append ( target ) #NEWLINE# iters . append ( iter ) #NEWLINE# ifss . append ( ifs ) #NEWLINE# #UNINDENT# res = [ ] #NEWLINE# for tup in itertools . product ( * tup ) : #NEWLINE# #INDENT# flag = True #NEWLINE# for ( target , val , ifs ) in zip ( targets , tup , ifss ) : #NEWLINE# #INDENT# ( yield target . store ( self , self . loctx , val ) ) #NEWLINE# for ifnod in ifs : #NEWLINE# #INDENT# flag = ( yield self . execcode_expr ( ifnod ) ) #NEWLINE# if ( not flag ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not flag ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# if flag : #NEWLINE# #INDENT# val = ( yield self . execcode_expr ( nod . elt ) ) #NEWLINE# res . append ( val ) #NEWLINE# #UNINDENT# #UNINDENT# return res