attribute vs trait

attribute

noun
  • A characteristic or quality of a thing. 

  • That which is predicated or affirmed of a subject; a predicate; an accident. 

  • A semantic item with which a method or other code element may be decorated. 

  • An object that is considered typical of someone or some function, in particular as an artistic convention. 

  • A word that qualifies a noun. 

  • An option or setting belonging to some object. 

verb
  • To ascribe (something) to a given cause, reason etc. 

  • To associate ownership or authorship of (something) to someone. 

trait

noun
  • An identifying characteristic, habit or trend. 

  • An uninstantiable collection of methods that provides functionality to a class by using the class’s own interface. 

How often have the words attribute and trait occurred in a corpus of books? (source: Google Ngram Viewer )