#NEWLINE# def p_power4( p ) : #NEWLINE# #INDENT# ' power : atom power_list DOUBLESTAR factor ' #NEWLINE# root = p [ 1 ] #NEWLINE# for node in p [ 2 ] : #NEWLINE# #INDENT# if isinstance ( node , ast . Call ) : #NEWLINE# #INDENT# node . func = root #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( node , ast . Attribute ) : #NEWLINE# #INDENT# node . value = root #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( node , ast . Subscript ) : #NEWLINE# #INDENT# node . value = root #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'Unexpected trailer node: %s' % node ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# root = node #NEWLINE# #UNINDENT# power = ast . BinOp ( left = root , op = ast . Pow ( ) , right = p [ 4 ] ) #NEWLINE# p [ 0 ] = power