title: Ensure uniqueness of instance attribute in python
body: <p>I have written a class with an instance attribute, call it name. What is the best way of ensuring that all instances of the class will have unique names? Do I create under the class, a set and every time a new instance is created, the name gets added to the set in the definition of init? Since a set is a collection of unique elements, I can therefore validate against whether the new instance's name can be successfully added to the set.</p>
  
  <p>EDIT: I wanted to be able to supply the name instead of assigning a UUID to it. So mementum's approach seems the most robust. jpkotta's is what I would have done. </p>