title: How to print signature of child class when parent class has __call__ defined
body: <p>I have the following code</p>
  <pre><code>class Type:
      def __init__(self,name):
          self.name = name
      
      def __call__(self):
          if self.name==&quot;Imaginary&quot;:
              print(f&quot;{self.real} + {self.img}i&quot;)
          if self.name == &quot;Integer&quot;:
              print(&quot;integer = {self.num}&quot;)
  
  
  class IntegerType(Type):
      def __init__(self,num):
          super().__init__(&quot;Integer&quot;)
          self.num = num
  
  class ImaginaryType(Type):
      def __init__(self, real, img):
          super().__init__(&quot;Imaginary&quot;)
          self.real = real
          self.img = img
  
  b = ImaginaryType(2,3)
  b()
  </code></pre>
  <blockquote>
  <p>output :  2 + 3i</p>
  </blockquote>
  <p>for the above <code>b</code> object if i use <code>inspect.signature</code> to check the signature of the class i see the following.</p>
  <pre><code>In [30]: from inspect import signature
  
  In [31]: signature(b)
  Out[31]: &lt;Signature ()&gt;
  </code></pre>
  <p>After going through the code of <code>inspect.signature</code>, I understand that it looks if <code>__call__</code> has been overrided in a base class. If so, it prints that. But, here, how can i retain signature of the ImaginaryType class? Which is that it takes <code>real</code> and <code>img</code> arguments?</p>