assume i have a class from library:
class A:
def foo():
pass
def bar():
pass
class B(A):
def anotherFunction():
pass
and i have a third library function that returns A, but i want to pass my code my enriched implementation, i mean class B. how can i take the A instance and insert it into B?
yes i thought about setattr for A instance but it won't help me with the typing completion. also i can pass in theh c'tor of B the A instance, and then implement all A functions in B just by calling the implementation of A instance. but its sound horrible, im sure im missing something, can you help?
thanks alot!