#NEWLINE# def update_sources( sources , foos , newx , ind , cfoos ) : #NEWLINE# #INDENT# ( cx , cy ) = ( 0 , 0 ) #NEWLINE# for ( i , foo ) in enumerate ( foos ) : #NEWLINE# #INDENT# get_new_sources ( newx , foo , sources [ i ] , cfoos [ i ] , cx , cy , compute_curve = ( i != 0 ) ) #NEWLINE# if ( i == 0 ) : #NEWLINE# #INDENT# full_y = sum ( [ foo ( newx ) for foo in foos ] ) #NEWLINE# sources [ i ] [ 'curve' ] . data = dict ( x = newx , base_x = base_x , y = full_y ) #NEWLINE# #UNINDENT# cp = sources [ i ] [ 'circle_point' ] . data #NEWLINE# ( cx , cy ) = ( cp [ 'x' ] [ 0 ] , cp [ 'y' ] [ 0 ] ) #NEWLINE# if ( i == ( len ( foos ) - 1 ) ) : #NEWLINE# #INDENT# sources [ i ] [ 'floating_point' ] . data [ 'x' ] = [ shift ] #NEWLINE# sources [ i ] [ 'floating_point' ] . data [ 'y' ] = [ cy ]