title: Instantiate a base class inside a child class after construction
body: <p>Let's say I have a class A:</p>
  
  <pre><code>class A(object):
   def __init__(self,x,y):
    self.x = x
    self.y = y
  </code></pre>
  
  <p>Now, let B inherit from A:</p>
  
  <pre><code>class B(A):
   def __init(self,x,y,p,q):
    A.__init__(self,x,y)
    self.p=p
    self.q=q
  </code></pre>
  
  <p>Let ex1 be an instance of B:</p>
  
  <pre><code>ex1 = B(x1,y1,p1,q1)
  </code></pre>
  
  <p>Is there an elegant way to create an instance of A and have it's attributes be assigned to B? Such that</p>
  
  <pre><code>exA = A(x2,y2)
  
  #something like...
  ex1.A = exA
  
  #..so that
  print(ex1.x) #yields x2
  print(ex1.y) #yeilds y2
  </code></pre>