QuestionQ56Verified/File Processing and Communicating with a Program’s EnvironmentCopy linkReport a problemAsk AstroTutorSave questionSelect the correct statement regarding the __name__ attribute.Aname is a special attribute, which is inherent for both classes and instances, and it contains information about the class to which a class instance belongs.Bname is a special attribute, which is inherent for both classes and instances, and it contains a dictionary of object attributes.Cname is a special attribute, which is inherent for classes, and it contains information about the class to which a class instance belongs.Dname is a special attribute, which is inherent for classes, and it contains the name of a class.Show AnswerAnswerExplanationIn Python, a class object’s __name__ attribute is the string containing that class’s name. It is not the per-object attribute dictionary and is not inherently an instance attribute. Python data model documentationLearn morePython documentation — type.__name__Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion