QuestionQ19Verified/Object-Oriented ProgrammingCopy linkReport a problemAsk AstroTutorSave questionWhat behavior is expected from the following code? AIt outputs 1BIt raises an exceptionCIt outputs 6DIt outputs 3Show AnswerAnswerExplanationA double-leading-underscore method name is name-mangled to _Class__foo within Class. Accessing it externally as o.__foo() does not use the mangled name, so it raises an AttributeError.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion