How to test if python class parent has method defined?
How to test if python class parent has method defined? Question: I have a subclass that may have a method ‘method_x’ defined. I want to know if ‘method_x’ was defined somewhere else up the class hierarchy. If I do: hasattr(self, ‘method_x’) I’ll get a truth value that also looks at any methods defined for the …