title: Python inheritance: pass all arguments from base to super class
body: <p>I am not quite used to class inheritance in Python yet. All I want to do is simply pass all arguments from my base class to the super class when it is created:</p>
  
  <pre><code>class A:
      def __init__(self, a, b):
          self.a = a
          self.b = b
  
      def do(self):
          c = self.a + self.b
          return B(c=c)
  
  class B(A):
      def __init__(self, c):
          self.c = c
  
  my_A = A(a=1, b=2)
  my_B = my_A.do()
  print(my_B.c)
  </code></pre>
  
  <p>This works as expected. However, what I want is to also be able to call the arguments <code>a</code> and <code>b</code> from the x2 instance of the class my_B, so that I can directly write <code>my_B.a</code> for instance. I know this is done with super() like this:</p>
  
  <pre><code>class A:
      def __init__(self, a, b):
          self.a = a
          self.b = b
  
      def do(self):
          c = self.a + self.b
          return B(a=self.a, b=self.b, c=c)
  
  class B(A):
      def __init__(self, a, b, c):
          super(B, self).__init__(a=a, b=b)
          self.c = c
  
  my_A = A(a=1, b=2)
  my_B = my_A.do()
  print(my_B.a)
  print(my_B.b)
  </code></pre>
  
  <p>However, I don't want to explicitly write all arguments of A when I create the instance of B. Is there a way to automatically pass all arguments from class A to class B?</p>