title: Why should I use __new__ instead of __init__ in this example?
body: <p>I have been studying <code>__new__</code> recently, and I've read lots of code where  <code>__new__</code>  is used instead of <code>__init__</code>. Sometimes I think both work, but I don't know why the original author uses <code>__new__</code>.</p>
  
  <p>Can someone explain why the below code uses <code>__new__</code> instead of <code>__init__</code>? I want a reason for this example. I know the difference between <code>__new__</code> and <code>__init__</code>, but I don't know why <code>__new__</code> is used here.</p>
  
  <p><a href="https://github.com/autotest/tp-qemu/blob/master/qemu/tests/cpuflags.py#L484" rel="noreferrer">Example</a>:</p>
  
  <pre><code>    class MiniSubtest(object):
          def __new__(cls, *args, **kargs):
              self = super(MiniSubtest, cls).__new__(cls)
              ret = None
              if args is None:
                  args = []
              try:
                  ret = self.test(*args, **kargs)
              finally:
                  if hasattr(self, "clean"):
                      self.clean()
              return ret
  </code></pre>
  
  <p>and I think if I use __init__, it still works, whey it used __new__? </p>