#NEWLINE# def __setattr__( self , name , value ) : #NEWLINE# #INDENT# if ( name in self . numeric_fields ) : #NEWLINE# #INDENT# if ( ( name == 'serv_cls_code' ) and ( str ( value ) not in self . serv_cls_code_list ) ) : #NEWLINE# #INDENT# raise AchError ( ( '%s not in serv_cls_code_list' % value ) ) #NEWLINE# #UNINDENT# value = self . validate_numeric_field ( value , value . field_lengths [ name ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name in self . alpha_numeric_fields ) : #NEWLINE# #INDENT# if ( ( name == 'std_ent_cls_code' ) and ( str ( value ) not in self . std_ent_cls_code_list ) ) : #NEWLINE# #INDENT# raise AchError ( ( '%s not in std_ent_cls_code_list' % value ) ) #NEWLINE# #UNINDENT# value = self . validate_alpha_numeric_field ( value , self . field_lengths [ name ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise AchError ( ( '%s not in numeric or alpha numeric fields list' % name ) ) #NEWLINE# #UNINDENT# #UNINDENT# super ( BatchHeader , self ) . __setattr__ ( name , value )