¿Cómo convertir (heredar) padre a clase hijo?
Me gustaría saber cómo convertir el objeto principal que alguna función devolvió a la clase secundaria.
<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>
No puedo cambiar la clase A. Si pudiera, implementaría functionIneed a la clase A, pero es imposible debido a la estructura del código. Gracias