#NEWLINE# def __init__( self , element , spec ) : #NEWLINE# #INDENT# self . name = element . attrib [ 'name' ] #NEWLINE# self . require = [ ] #NEWLINE# for required in chain . from_iterable ( element . findall ( 'require' ) ) : #NEWLINE# #INDENT# if ( required . tag == 'type' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# data = { #NEWLINE# #INDENT# 'enum' : spec . enums , #NEWLINE# 'command' : spec . commands , #NEWLINE# #UNINDENT# } [ data . tag ] #NEWLINE# try : #NEWLINE# #INDENT# self . require . append ( data [ required . attrib [ 'name' ] ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass