#NEWLINE# def add_value( self , value ) : #NEWLINE# #INDENT# 'Add a value to this enum.' #NEWLINE# if value . enum : #NEWLINE# #INDENT# raise ValueError ( 'Cannot add an enum value to %s, the value is already in an enum, %s' , self , value ) #NEWLINE# #UNINDENT# self . values . append ( value ) #NEWLINE# self . add_child ( self ) #NEWLINE# value . enum = self #NEWLINE# return value