#NEWLINE# def __setattr__( self , name , value ) : #NEWLINE# #INDENT# if hasattr ( self , msg ) : #NEWLINE# #INDENT# msg = '{!r} object attribute {!r} is read-only' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = '{!r} object has no attribute {!r}' #NEWLINE# #UNINDENT# raise AttributeError ( msg . format ( self . __class__ . __name__ , name ) )