#NEWLINE# @ staticmethod #NEWLINE# def create( value ) : #NEWLINE# #INDENT# if isinstance ( value , bool ) : #NEWLINE# #INDENT# obj = ConfigBool ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , basestring ) : #NEWLINE# #INDENT# obj = ConfigStr ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , int ) : #NEWLINE# #INDENT# obj = ConfigInt ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , float ) : #NEWLINE# #INDENT# obj = ConfigFloat ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( obj , list ) : #NEWLINE# #INDENT# obj = ConfigList ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , ConfigurationObject ) : #NEWLINE# #INDENT# obj = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# obj = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( 'Cannot create ConfigValue from value "%s"' % value ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( obj is not None ) : #NEWLINE# #INDENT# obj . set_value ( value ) #NEWLINE# #UNINDENT# return obj