Say, I have some MainClass which at some point in its methods has instantiation of an object of a OtherClass as an attribute of the MainClass.
mainobj = MainClass()
isinstance(mainobj.otherclassobj, OtherClass) == True
Now, I want to extend the OtherClass, and then use the MainClass with new extended class.
Do I have more convenient options, other than extending MainClass and redefining all of its methods which instantiate self.otherclassobj to do it from ExtendedOtherClass?