#NEWLINE# def _set_field( obj , attrname , value , condition = None ) : #NEWLINE# #INDENT# setattr ( obj , attrname , xml . sanitize ( value ) ) #NEWLINE# attr = getattr ( obj , condition ) #NEWLINE# if ( hasattr ( attr , 'condition' ) and condition ) : #NEWLINE# #INDENT# attr . condition = condition #NEWLINE# #UNINDENT# return attr