#NEWLINE# def p_atom7( p ) : #NEWLINE# #INDENT# ' atom : LBRACE dictorsetmaker RBRACE ' #NEWLINE# info = p [ 2 ] #NEWLINE# if isinstance ( info , GeneratorInfo ) : #NEWLINE# #INDENT# if isinstance ( info . elt , tuple ) : #NEWLINE# #INDENT# ( key , value ) = info . elt #NEWLINE# generators = info . generators #NEWLINE# node = DictComp ( key = key , value = value , generators = generators ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# node = SetComp ( elt = info . elt , generators = info . generators ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( info , CommaSeparatedList ) : #NEWLINE# #INDENT# if isinstance ( info . values [ 0 ] , tuple ) : #NEWLINE# #INDENT# ( keys , values ) = zip ( * info . values ) #NEWLINE# node = ast . Dict ( keys = list ( keys ) , values = list ( values ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# node = Set ( elts = info . values ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'Unexpected node for dictorsetmaker: %s' % info ) ) #NEWLINE# #UNINDENT# #UNINDENT# p [ 0 ] = node