title: What is the downside of using object.__new__ in __new__?
body: <p>Coding exception classes, I came across this error: </p>
  
  <p><code>TypeError: object.__new__(A) is not safe, use Exception.__new__()</code></p>
  
  <p>There's a similar question posted here:
  <a href="https://stackoverflow.com/questions/12952184/typeerror-object-new-int-is-not-safe-use-int-new">TypeError: object.__new__(int) is not safe, use int.__new__()</a>. So <code>__new__</code> was deprecated for the following reason:</p>
  
  <p><a href="https://mail.python.org/pipermail/python-dev/2008-February/076854.html" rel="nofollow noreferrer">[Python-Dev] <code>__new__</code> deprecation</a></p>
  
  <blockquote>
    <p>Guido van Rossum </p>
    
    <p><em>"The message means just what it says. :-) There's no point in calling
    <code>object.__new__()</code> with more than a class parameter, and any code that
    did so was just dumping those args into a black hole."</em></p>
  </blockquote>
  
  <p>But the warning in 3.3 that I get "is not safe" is scary. I try to understand the implication of using <code>object.__new__</code>, let's consider this example: </p>
  
  <pre><code>&gt;&gt;&gt; class A(Exception):
  ...     def __new__(cls, *args):
  ...             return object.__new__(A)
  ...
  &gt;&gt;&gt; A()
  TypeError: object.__new__(A) is not safe, use Exception.__new__()
  </code></pre>
  
  <p>Fails miserably. Another Example: </p>
  
  <pre><code>&gt;&gt;&gt; class A(object):
  ...     def __new__(cls, *args):
  ...             return object.__new__(A)
  ...
  &gt;&gt;&gt;
  &gt;&gt;&gt; A()
  &lt;__main__.A object at 0x0000000002F2E278&gt;
  </code></pre>
  
  <p>works fine. Although, <code>object</code> is a builtin class just like <code>Exception</code> with respect to their roles, they share the trait of being builtin-classes. Now with <code>Exception</code>, the first example raises <code>TypeError</code>, but with <code>object</code>, it does not? </p>
  
  <p><strong>(a) What are the downsides of using <code>object.__new__</code> that made Python to raise the error (<code>TypeError:...is not safe...</code>) in the first Example?</strong> </p>
  
  <p><strong>(b) What sort of checking Python performs before to calling <code>__new__</code>? Or: What is the condition that makes Python raise the error in the first example?</strong> </p>