QuestionQ65

VerifiedObject-Oriented Programming

What behavior is expected from the following code?

Question Image

Explanation

An object created with Upper() is an instance of Upper but not of its subclass Lower, so the isinstance call prints False. Its method() implementation is Upper.method, which returns upper.

Community Discussion

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