#NEWLINE# def __setattr__( self , key , value ) : #NEWLINE# #INDENT# self . _validate_value ( key , value ) #NEWLINE# common = object . __getattribute__ ( self , 'common_keys' ) #NEWLINE# mapped = object . __getattribute__ ( self , 'mapped_keys' ) #NEWLINE# if ( key in mapped ) : #NEWLINE# #INDENT# ( lk , _ ) = mapped [ key ] #NEWLINE# if self . _legacy : #NEWLINE# #INDENT# if ( lk is None ) : #NEWLINE# #INDENT# raise NotImplementedError #NEWLINE# #UNINDENT# self . _legacy [ lk ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key not in ( 'commands' , 'exports' , 'modules' , 'namespaces' , 'classifiers' ) ) : #NEWLINE# #INDENT# self . _data [ key ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# d = self . _data . setdefault ( 'extensions' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( key == 'commands' ) : #NEWLINE# #INDENT# d [ 'python.commands' ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key == 'classifiers' ) : #NEWLINE# #INDENT# d = d . setdefault ( 'python.details' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# d [ key ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# d = d . setdefault ( 'python.exports' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# d [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( key not in common ) : #NEWLINE# #INDENT# object . __setattr__ ( self , key , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key == 'keywords' ) : #NEWLINE# #INDENT# if isinstance ( value , string_types ) : #NEWLINE# #INDENT# value = value . strip ( ) #NEWLINE# if value : #NEWLINE# #INDENT# value = value . split ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = [ ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if self . _legacy : #NEWLINE# #INDENT# self . _legacy [ key ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _data [ key ] = value