I would like to know how to convert parent object that was return by some function to child class.
class A(object): def __init__(): pass class B
How about:
i = module.getObject() # i will get object that is class A try: i.functionIneed() except AttributeError: # handle case when u have a bad object
Read up on duck typing.