#NEWLINE# @ pg . production ( 'ternary : expr IF expr ELSE expr' ) #NEWLINE# def actual_ternary( s , p ) : #NEWLINE# #INDENT# res = ast . Ternary ( s . pos ( p [ 1 ] ) ) #NEWLINE# res . cond = p [ 2 ] #NEWLINE# res . values = [ p [ 0 ] , s [ 4 ] ] #NEWLINE# return res