#NEWLINE# def __init__( self , **kwargs ) : #NEWLINE# #INDENT# '\n        Create a choice element, optionally providing attribute/property values.\n        There should only be one, but that is not strictly enforced.\n        ' #NEWLINE# if _debug : #NEWLINE# #INDENT# Choice . _debug ( '__init__ %r' , kwargs ) #NEWLINE# #UNINDENT# my_kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# other_kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for element in self . choiceElements : #NEWLINE# #INDENT# if ( element . name in kwargs ) : #NEWLINE# #INDENT# my_kwargs [ element . name ] = kwargs [ element . name ] #NEWLINE# #UNINDENT# #UNINDENT# for kw in kwargs : #NEWLINE# #INDENT# if ( kw not in my_kwargs ) : #NEWLINE# #INDENT# other_kwargs [ kw ] = kwargs [ kw ] #NEWLINE# #UNINDENT# #UNINDENT# if _debug : #NEWLINE# #INDENT# Choice . _debug ( '    - my_kwargs: %r' , my_kwargs ) #NEWLINE# #UNINDENT# if _debug : #NEWLINE# #INDENT# Choice . _debug ( '    - other_kwargs: %r' , other_kwargs ) #NEWLINE# #UNINDENT# super ( Choice , self ) . __init__ ( ** other_kwargs ) #NEWLINE# for element in self . choiceElements : #NEWLINE# #INDENT# setattr ( self , element . name , my_kwargs . get ( element . name , None ) )