#NEWLINE# def iter_choices( self ) : #NEWLINE# #INDENT# d = OrderedDict ( ) #NEWLINE# for ( value , label ) in self . choices : #NEWLINE# #INDENT# selected = ( ( self . data is not None ) and ( self . coerce ( value ) in self . data ) ) #NEWLINE# d [ value ] = ( value , label , selected ) #NEWLINE# #UNINDENT# if self . data : #NEWLINE# #INDENT# for value in self . data : #NEWLINE# #INDENT# if value : #NEWLINE# #INDENT# ( yield d . pop ( value ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# while d : #NEWLINE# #INDENT# ( yield d . popitem ( last = False ) [ 1 ] )