title: How to convert (inherit) parent to child class?
body: <p>I would like to know how to convert parent object that was return by some function to child class.</p>
  
  <pre><code>class A(object):
      def __init__():
          pass
  
  class B(A):
      def functionIneed():
          pass
  
  i = module.getObject() # i will get object that is class A
  j = B(i) # this will return exception
  j.functionIneed()
  </code></pre>
  
  <p>I cannot change class A. If I could I would implement functionIneed to class A, but it is impossible because of structure of code.</p>