Python_Institute
PCPP-32-101 · Question #49
Select the true statement about the __dict__ attribute.
The correct answer is A. __dict__ is a special attribute, which is inherent for both classes and instances - it contains a. The __dict__ attribute is a dictionary that stores an object's writable attributes and is present on both class objects and their instances.
Advanced OOP
Question
Select the true statement about the dict attribute.
Options
- Adict is a special attribute, which is inherent for both classes and instances - it contains a
- Bdict is a special attribute, which is inherent for classes - it is a tuple that contains
- Cdict is a special attribute, which is inherent for classes - it contains information about the
- Ddict is a special attribute, which is inherent for classes - it contains the name of a class.
How the community answered
(25 responses)- A88% (22)
- B4% (1)
- C8% (2)
Explanation
The dict attribute is a dictionary that stores an object's writable attributes and is present on both class objects and their instances.
Topics
#__dict__#special attributes#class attributes#instance attributes
Community Discussion
No community discussion yet for this question.