QuestionQ28

VerifiedAdvanced Object-Oriented Programming

If inheritance could lead to an MRO inconsistency, should you stop using inheritance entirely and use polymorphism instead?

Explanation

An MRO inconsistency reflects conflicting ordering requirements in a multiple-inheritance design. Inheritance and polymorphism are compatible concepts, and a redesigned inheritance hierarchy can restore a consistent method-resolution order.

Community Discussion

No comments yet. Be the first to start the discussion!