title: What are some (concrete) use-cases for metaclasses?
body: <p>I have a friend who likes to use metaclasses, and regularly offers them as a solution.</p>
  
  <p>I am of the mind that you almost never need to use metaclasses. Why? because I figure if you are doing something like that to a class, you should probably be doing it to an object. And a small redesign/refactor is in order.</p>
  
  <p>Being able to use metaclasses has caused a lot of people in a lot of places to use classes as some kind of second rate object, which just seems disastrous to me. Is programming to be replaced by meta-programming? The addition of class decorators has unfortunately made it even more acceptable.</p>
  
  <p>So please, I am desperate to know your valid (concrete) use-cases for metaclasses in Python. Or to be enlightened as to why mutating classes is better than mutating objects, sometimes.</p>
  
  <p>I will start:</p>
  
  <blockquote>
    <p>Sometimes when using a third-party
    library it is useful to be able to
    mutate the class in a certain way.</p>
  </blockquote>
  
  <p>(This is the only case I can think of, and it's not concrete)</p>